Search code examples
pythonvisual-studio-codedebuggingvscode-debugger

How can I skip over loops while debugging in VS Code?


Is there a way to skip for and while loops while debugging Python code in VS Code? I have to call a method that iterates through a 2D array before I get to where I actually want to debug, so it's kind of annoying to have to do that each time I try to debug.


Solution

  • Set a breakpoint after the line that needs to be skipped. You can also edit breakpoints and enter expressions to skip them.

    enter image description here