How do you add breakpoints to a Python program in IDLE?

后端 未结 4 1162
后悔当初
后悔当初 2020-12-05 22:38

I solved this already, I\'m just posting it here because I couldn\'t figure it out with google, or by reading the docs. I only found it by accident.

To add a breakpo

4条回答
  •  遥遥无期
    2020-12-05 23:30

    You can set breakpoint before it is run.

    1. Set the breakpoint by right clicking on the relevant line of your program
    2. On your python shell, look for Debug - [Debug On] will be shown in your IDLE Python shell
    3. Go back to your program and press F5(hotkey) to run the program, it will stop in the relevant break line(s)
    4. If you want to look at some global variables or line of codes, you can check the box in the debugger

提交回复
热议问题