Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
393 views
in Technique[技术] by (71.8m points)

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

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 breakpoint, right-click on the line that you want to add a breakpoint on and select "Set Breakpoint". The line will become highlighted. (Note that this only works when you are editing a file; it does not work at the interpreter.)

This site has a detailed tutorial about using the IDLE debugger.

On Mac, you need to Control-click instead of right clicking.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Completing the answer supplied by the OP: after setting the breakpoint - you must turn on IDLE's debug mode (using debug --> debugger). When you run the program, press "Go" in the debug window that opens up and IDLE will stop at the breakpoint.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...