|
| 1 | +# Copyright (C) 2025 Rocky Bernstein <rb@dustyfeet.com> |
| 2 | +# This program is free software: you can redistribute it and/or modify |
| 3 | +# it under the terms of the GNU General Public License as published by |
| 4 | +# the Free Software Foundation, either version 3 of the License, or |
| 5 | +# (at your option) any later version. |
| 6 | +# |
| 7 | +# This program is distributed in the hope that it will be useful, |
| 8 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | +# GNU General Public License for more details. |
| 11 | +# |
| 12 | +# You should have received a copy of the GNU General Public License |
| 13 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1 | 14 | """ |
2 | 15 | mathicsscript Interrupt routines. |
3 | 16 |
|
@@ -108,6 +121,8 @@ def Mathics3_interrupt_handler( |
108 | 121 | elif user_input in ("continue", "c"): |
109 | 122 | print_fn("continuing") |
110 | 123 | break |
| 124 | + elif user_input in ("debugger", "d"): |
| 125 | + breakpoint() |
111 | 126 | elif user_input in ("exit", "quit"): |
112 | 127 | print_fn("Mathics3 exited because of an interrupt.") |
113 | 128 | sys.exit(3) |
@@ -138,6 +153,7 @@ def Mathics3_interrupt_handler( |
138 | 153 | """Your options are: |
139 | 154 | abort (or a) to abort current calculation |
140 | 155 | continue (or c) to continue |
| 156 | + debugger (or d) to to enter a Python debugger |
141 | 157 | exit (or quit) to exit Mathics3 |
142 | 158 | inspect (or i) to enter an interactive dialog |
143 | 159 | show (or s) to show current operation (and then continue) |
|
0 commit comments