Ask Your Question

How to prevent the debugger from traversing code within a specific package?

asked 2021-03-08 03:59:35 -0500

cebeach gravatar image

updated 2021-03-08 07:33:34 -0500

I have a complex package which implements several abstract base classes from which my classes inherit. When debugging, it is both laborious and not useful to traverse this code; it is there a way for me to instruct wing to avoid descending into it when I am single-stepping code?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-03-08 07:39:06 -0500

The way to do this is to not Step Into but instead Step Over when on lines that would get into such code. In general, Step Over is the way to go and only use Step Into if you need to see what happens in that call.

If you accidentally step past something of interest, in some contexts you can right-click on an earlier line and select Move Program Counter Here. Because of limitations in Python that only works sometimes (for example, only in the innermost stack frame, not after an exception is raised, and not in crossing certain block contexts) but it is still often useful. You do of course need to take into account state changes in the code that might have occurred in the already-executed later code, but I've found that in general this isn't an issue that affects debugging.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-03-08 03:59:35 -0500

Seen: 23 times

Last updated: Mar 08