inducer / pudb

Full-screen console debugger for Python
https://documen.tician.de/pudb/
Other
2.97k stars 229 forks source link

Run to line in the same frame #625

Open asmeurer opened 10 months ago

asmeurer commented 10 months ago

It would be useful to have some way to run to a given line but only within the same stack frame as the currently visible one.

The reason is that when debugging a recursive function, you often end up using t to run to a line, but it runs to the line in a recursive call. From there it becomes very difficult to get back to the context where you were. For highly recursive functions, it's very difficult to effectively debug them with pudb. If you could run to a given line without stopping in recursive calls, it would make debugging easier in these cases.

It could also be useful to have this as an option for breakpoints, although that might be more complicated to implement.

inducer commented 10 months ago

I like this idea. I feel like I've wished for that in the past. Patches welcome!