0

When I want to run code in latest Spyder 5.4.2, I have to use different shortcuts depending on whether I am in debug mode or not. How can I simplify this process?

If I am in debug mode, I first have to exit debug mode by holding down Ctrl+Shift and pressing F12, then release all keys and press F5. If I am not in debug mode, the code runs just by pressing F5. Of course, it would be desirable to run the code just by pressing a single key (e.g. F5) and not worry about whether I am in debug mode.

There is a second problem. If I accidentally press F5 in debug mode, Spyder hangs and the kernel has to be restarted. Restarting the kernel demands additional key presses (Ctrl+.) and the restart process takes a while. (This bug was described here.) Since I often have to debug and execute my code, I also often forget or do not know whether I am in debug mode or not. As a result, I unnecessarily restart the kernel 100 times a day. Is it not advisable to run the code often or should I prophylactically run my code always with this long key series: hold Ctrl+Shift then press F12, then release them and press F5?

0 Answers0