Skip to content

Commit 028334f

Browse files
messages for toggling auto-debug
1 parent d357b0f commit 028334f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
Save sessions ({config.save_key}) or post them to pastebins ({config.pastebin_key})! Current pastebin helper: {config.pastebin_helper}
8181
Reload all modules and rerun session ({config.reimport_key}) to test out changes to a module.
8282
Toggle auto-reload mode ({config.toggle_file_watch_key}) to re-execute the current session when a module you've imported is modified.
83+
Toggle auto-debug mode ({config.debug_key}) to trigger a debugger whenever an exception is raised.
8384
8485
bpython -i your_script.py runs a file in interactive mode
8586
bpython -t your_script.py pastes the contents of a file into the session
@@ -881,12 +882,16 @@ def toggle_file_watch(self):
881882
def toggle_auto_debug(self):
882883
if debugger is None:
883884
self.status_bar.message(
884-
_('No debugger, check your PYTHON_DEBUGGER value.\n'))
885+
_('No debugger, check your PYTHON_DEBUGGER value.'))
885886
return
886887
if sys.excepthook is not debugger_hook:
888+
self.status_bar.message(
889+
_('Auto-debug activated'))
887890
sys.excepthook = debugger_hook
888891
else:
889892
sys.excepthook = sys.__excepthook__
893+
self.status_bar.message(
894+
_('Auto-debug deactivated'))
890895

891896
# Handler Helpers
892897
def add_normal_character(self, char):

0 commit comments

Comments
 (0)