Ask Your Question
1

IDE tutorial setting Python shell breakpoint

asked 2017-11-05 15:50:00 -0500

William gravatar image

updated 2019-03-15 10:01:20 -0500

In following the tutorial; I tried every way I can think of to set the breakpoint.  If I understand correctly, the breakpoint setting is to be done at the shell;Let's try this out. Paste the following into the Python Shell and press Enter so that you are returned to the >>> prompt:

def test_function():
x = 10
print(x)
x += 5
y = 20
print(x+y)

Then place a breakpoint on the line that reads print(x).Next type this into the Python Shell and press Enter:test_function()Wing should reach the breakpoint on the print(x) line.

Where, how should the breakpoint be set?

edit retag flag offensive close merge delete

Comments

Is Enable Debugging checked in the Python Shell's Options menu?  If not, code in the shell is not debugged and the breakpoints margin is hidden.

Wingware Support gravatar imageWingware Support ( 2017-11-05 18:53:00 -0500 )edit

The debugging was enabled.  My initial reaction was to try to set it as one does with Eclipse.  I did not expect having to click on the margin, rather than putting the cursor at the beginning of the code line where one wishes to place the breakpoint.  It was by trying every thing that I clicked on the margin.  I searched the manual and did not find an explanation using the search word; shell, breakpoint.  I just noticed that the shell breakpoint setting does not behave as does the editor breakpoint setting.  And in the manual there is a sentence about the margin setting.  I missed it the first time read/search.

William gravatar imageWilliam ( 2017-11-05 19:30:00 -0500 )edit

Oh, I see.  The menu-level commands are only being applied to editors now, but that is wrong and they should also work as you describe above for Python Shell and Debug Probe.  We'll try to fix this and also clarify the tutorial.  Thanks for pointing that out!

Wingware Support gravatar imageWingware Support ( 2017-11-06 08:44:00 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2017-11-05 15:58:00 -0500

William gravatar image

updated 2019-03-07 07:58:16 -0500

Wingware Admin gravatar image

Isn't that always the case; ask for help and "find the answer."  The tutorial is not clear.  To set the breakpoint at the shell; simply click on the gray prompt/number boarder, 2>>>  Then you will get the RED dot.

Clarification; on the gray number line boarder, place the cursor and right mouse click to get "Add breakpoint."  I initially got it by double clicking.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-11-05 15:50:00 -0500

Seen: 24 times

Last updated: Mar 07