Skip to content
Advertisement

Spyder: run a command in debug mode

I want to use the Spyder debugger (ipdb or whatever it is) from the console. It seems like the only way to enter the debugger is with the “Debug file” command, which requires me to make a dedicated file every time I want to debug something. It seems like there must be a way to do this that I just haven’t found.

Advertisement

Answer

Found it (although it has what I consider to be a bug).

%debug result = my_cool_function(stuff)

The bug is that the debugger stops immediately, as if there were a breakpoint. I then have to press Ctrl-F12 to advance.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement