From 5cccc52664a0a2bf4d6ed85fb4a0c0e66013aa9e Mon Sep 17 00:00:00 2001 From: Michael Elovskikh Date: Sat, 15 Apr 2017 02:00:22 +0500 Subject: [PATCH 1/6] Make configuration section documentation --- doc/configuration.rst | 100 ++++++++++++++++++++++++++++++++++++++++++ doc/index.rst | 1 + 2 files changed, 101 insertions(+) create mode 100644 doc/configuration.rst diff --git a/doc/configuration.rst b/doc/configuration.rst new file mode 100644 index 00000000..5250a0d2 --- /dev/null +++ b/doc/configuration.rst @@ -0,0 +1,100 @@ +Configuration +------------- + +Following options are available to customise PuDB behaviour: + +shell +***** + +This is the shell that will be used when you hit ``!``. Available choices: + +* internal +* classic +* ipython +* bpython +* ptpython + +theme +***** + +PuDB UI theme. Select one available or use your own by setting ``custom_theme``. + +custom_theme +************ + +To use a custom theme, see example-theme.py in the pudb distribution. Enter +the full path to a file like it in the box above. ``~`` will be expanded to +your home directory. Note that a custom theme will not be applied until you +close this dialog. + + +line_numbers +************ + +Show or hide the line numbers in the source code pane. + +sidebar_width +************* + +The sidebar pane width. + +variables_weight +**************** + +The variables pane height. + +stack_weight +************ + +The stack pane height. + +breakpoints_weight +****************** + +The breakpoints pane height. + +current_stack_frame +******************* + +Show the current stack frame at the top or at the bottom. + +stringifier +*********** + +This is the default function that will be called on variables in the variables +list. Note that you can change this on a per-variable basis by selecting a +variable and hitting Enter or by typing ``t``/``s``/``r``. Note that str and +repr will be slower than type and have the potential to crash PuDB. + +custom_stringifier +****************** + +To use a custom stringifier, see example-stringifier.py in the pudb +distribution. Enter the full path to a file like it in the box above. ``~`` +will be expanded to your home directory. The file should contain a function +called ``pudb_stringifier()`` at the module level, which should take a single +argument and return the desired string form of the object passed to it. Note +that if you choose a custom stringifier, the variables view will not be updated +until you close this dialog. + +wrap_variables +************** + +Note that you can change this option on a per-variable basis by selecting the +variable and pressing ``w``. + +display +******* + +What driver is used to talk to your terminal. ``raw`` has the most features +(colors and highlighting), but is only correct for XTerm and terminals like it. +``curses`` has fewer features, but it will work with just about any terminal. +``auto`` will attempt to pick between the two based on availability and +the ``$TERM`` environment variable. + +Changing this setting requires a restart of PuDB. + +prompt_on_quit +************** + +Prompt or not before quitting. \ No newline at end of file diff --git a/doc/index.rst b/doc/index.rst index 7cc66bf9..e9b7754b 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -13,6 +13,7 @@ Table of Contents starting usage shells + configuration misc From b1eaaf66ee4adbe556e152d9c2bc39e2cfef727a Mon Sep 17 00:00:00 2001 From: Michael Elovskikh Date: Sat, 15 Apr 2017 02:02:48 +0500 Subject: [PATCH 2/6] Add note about config location --- doc/configuration.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/configuration.rst b/doc/configuration.rst index 5250a0d2..4e413b24 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -1,6 +1,7 @@ Configuration ------------- +PuDB uses configuration file is located at ``~/.config/pudb/pudb.cfg``. Following options are available to customise PuDB behaviour: shell From 3fc2f96be3660d1ca394a68b8c2c834209eabc10 Mon Sep 17 00:00:00 2001 From: Michael Elovskikh Date: Sat, 15 Apr 2017 16:50:32 +0500 Subject: [PATCH 3/6] Corrected the config file path desctiption --- doc/configuration.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/configuration.rst b/doc/configuration.rst index 4e413b24..8ee33d69 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -1,7 +1,13 @@ Configuration ------------- -PuDB uses configuration file is located at ``~/.config/pudb/pudb.cfg``. +All PuDB information is stored in a location specified by the `XDG Base +Directory Specification +`_. +Usually, it is ``~/.config/pudb``. The PuDB configuration is stored at +``pudb.cfg`` file inside that directory. Therefore the whole path is usually +``~/.config/pudb/pudb.cfg``. + Following options are available to customise PuDB behaviour: shell From 194d41f06711ea7d14e68c165add908aba8af71a Mon Sep 17 00:00:00 2001 From: Michael Elovskikh Date: Wed, 26 Apr 2017 00:59:52 +0500 Subject: [PATCH 4/6] Remove description for inner settings --- doc/configuration.rst | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/doc/configuration.rst b/doc/configuration.rst index 8ee33d69..f6e51882 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -40,26 +40,6 @@ line_numbers Show or hide the line numbers in the source code pane. -sidebar_width -************* - -The sidebar pane width. - -variables_weight -**************** - -The variables pane height. - -stack_weight -************ - -The stack pane height. - -breakpoints_weight -****************** - -The breakpoints pane height. - current_stack_frame ******************* From 2933857685af977c6ff2ee5c348ff09367f0ead8 Mon Sep 17 00:00:00 2001 From: Michael Elovskikh Date: Sun, 30 Apr 2017 21:36:30 +0500 Subject: [PATCH 5/6] Added note about config dialog --- doc/configuration.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/configuration.rst b/doc/configuration.rst index f6e51882..b02a62ce 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -1,8 +1,9 @@ Configuration ------------- -All PuDB information is stored in a location specified by the `XDG Base -Directory Specification +At debugging session ``Ctrl-P`` shortcut opens configuration dialog. +Additionally all PuDB information is stored in a location specified by the +`XDG Base Directory Specification `_. Usually, it is ``~/.config/pudb``. The PuDB configuration is stored at ``pudb.cfg`` file inside that directory. Therefore the whole path is usually From dc6428cb80985c8478eb0e0092f9ca6028ab9d27 Mon Sep 17 00:00:00 2001 From: Michael Elovskikh Date: Sun, 30 Apr 2017 21:57:02 +0500 Subject: [PATCH 6/6] Updated config docs --- doc/configuration.rst | 84 ++++++++++++++++++++++++++++--------------- 1 file changed, 55 insertions(+), 29 deletions(-) diff --git a/doc/configuration.rst b/doc/configuration.rst index b02a62ce..8b6ac5fb 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -11,9 +11,25 @@ Usually, it is ``~/.config/pudb``. The PuDB configuration is stored at Following options are available to customise PuDB behaviour: -shell +Line Numbers +************ + +``line_numbers`` + +Show or hide the line numbers in the source code pane. + +Prompt on quit +************** + +``prompt_on_quit`` + +Prompt or not before quitting. + +Shell ***** +``shell`` + This is the shell that will be used when you hit ``!``. Available choices: * internal @@ -22,57 +38,72 @@ This is the shell that will be used when you hit ``!``. Available choices: * bpython * ptpython -theme -***** +``custom_shell`` -PuDB UI theme. Select one available or use your own by setting ``custom_theme``. +Your own custom shell. See example-shell.py in the pudb distribution. Enter +the full path to a file like it in the box above. ``~`` will be expanded to your +home directory. The file should contain a function called +``pudb_shell(_globals, _locals)`` at the module level. -custom_theme -************ +Theme +***** -To use a custom theme, see example-theme.py in the pudb distribution. Enter -the full path to a file like it in the box above. ``~`` will be expanded to -your home directory. Note that a custom theme will not be applied until you -close this dialog. +``theme`` +PuDB UI theme. Available choices: -line_numbers -************ +* classic +* vim +* dark vim +* midnight +* solarized +* agr-256 +* monokai +* monokai-256 -Show or hide the line numbers in the source code pane. +``custom_theme`` -current_stack_frame +Your own custom theme, see example-theme.py in the pudb distribution. Enter +the full path to a file like it in the box above. ``~`` will be expanded to +your home directory. + +Stack Order ******************* +``current_stack_frame`` + Show the current stack frame at the top or at the bottom. -stringifier -*********** +Variable Stringifier +******************** + +``stringifier`` This is the default function that will be called on variables in the variables list. Note that you can change this on a per-variable basis by selecting a variable and hitting Enter or by typing ``t``/``s``/``r``. Note that str and repr will be slower than type and have the potential to crash PuDB. -custom_stringifier -****************** +``custom_stringifier`` To use a custom stringifier, see example-stringifier.py in the pudb distribution. Enter the full path to a file like it in the box above. ``~`` will be expanded to your home directory. The file should contain a function called ``pudb_stringifier()`` at the module level, which should take a single -argument and return the desired string form of the object passed to it. Note -that if you choose a custom stringifier, the variables view will not be updated -until you close this dialog. +argument and return the desired string form of the object passed to it. -wrap_variables +Wrap variables ************** +``wrap_variables`` + Note that you can change this option on a per-variable basis by selecting the variable and pressing ``w``. -display -******* +Display drive +************* + +``display`` What driver is used to talk to your terminal. ``raw`` has the most features (colors and highlighting), but is only correct for XTerm and terminals like it. @@ -81,8 +112,3 @@ What driver is used to talk to your terminal. ``raw`` has the most features the ``$TERM`` environment variable. Changing this setting requires a restart of PuDB. - -prompt_on_quit -************** - -Prompt or not before quitting. \ No newline at end of file