How to debug in spyder line by line without enterting external libraries

Viewed 52

When i try to debug in spyder line by line, it keeps entering external libraries like "iostream" for example or whatever libraries the code need it. However, when I tried visual studio code, it worked correctly and only went through my source code lines. Is it possible to make spyder works in the same way?

2 Answers

Take care to distinguish between n next source line versus s step into a function.

As a last resort you can always set a b breakpoint a few lines down in your function, and then c continue silently executing all the code in between, including library calls.

(Spyder maintainer here) To avoid entering in external Python libraries while debugging, you need to go the menu

Tools > Preferences > IPython console > Debugger

and enable the option called Ignore Python libraries while debugging.

Related