IDE tutorial setting Python shell breakpoint


38
views
2
12 days ago by
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?
Community: Wing Python IDE
3
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.
written 11 days ago by William  
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!
written 11 days ago by Wingware Support  
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.
written 11 days ago by Wingware Support  

1 Answer


3
12 days ago by
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.
Please login to add an answer/comment or follow this question.

Similar posts:
Search »