Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode's debugging mode always stop at first line

I am using vscode for python development. I sometimes use debug running mode, and vscode always stop at first line even if there are no breakpoints. I attached a screenshot of this phenomenon. It's a little annoying and I want to skip this. Are there any ways to skip this?

My Env

  • Code Runner 0.6.5
  • MagicPython 1.0.3
  • Python 0.5.5
  • Python for VSCode

enter image description here

like image 429
jef Avatar asked Dec 31 '16 10:12

jef


People also ask

What do you place down in order to stop at a line of code to Debug?

Step into code line by line To stop on each statement when you're debugging, use Debug > Step Into, or select F11. The debugger steps through code statements, not physical lines.

How do I stop debug mode?

To exit debug mode, press Alt+B followed by D. at the Command Prompt to exit debug mode.

How do you get to the next step in debug mode in Visual Studio?

In most languages supported by Visual Studio, you can edit your code in the middle of a debugging session and continue debugging. To use this feature, click into your code with your cursor while paused in the debugger, make edits, and press F5, F10, or F11 to continue debugging.


1 Answers

The launch.json file has the setting "stopOnEntry":true. Change this to false to prevent this.

The docs for this can be found https://code.visualstudio.com/docs/python/debugging#_stoponentry

like image 70
dalyIsaac Avatar answered Oct 17 '22 07:10

dalyIsaac