[wingide-users] I can't get debugging from inside of Wing to work

Jens Hauch Jens at arena.net
Mon Dec 19 12:46:42 MST 2011


That totally makes sense and seems to be the issue with the modules we trying to debug. There is no code that executes on import of the module, everything is in a function or a class. That is what I assumed 'Run Arguments' was for in the Debug window, to pass in the command to run.

I now understand that this is not the case as 'Arguments' are just passed in via the sys.argv. I would love to have a way to debug files in place without having to add special code into them that we need to remove when we are done debugging.
 
What is the best way to debug a function in a module without adding top level calls to the function at the bottom of the module?

Can I 'remote debug' from the Python Shell in Wing?

Cheers,
Jens


-----Original Message-----
From: Wingware Support [mailto:support at wingware.com] 
Sent: Monday, December 19, 2011 10:05 AM
To: Jens Hauch
Cc: wingide-users at wingware.com
Subject: Re: [wingide-users] I can't get debugging from inside of Wing to work

On 12/19/11 12:58 PM, Jens Hauch wrote:
> 'Debug ->  Step Into' (F7) works, but if I then 'Start/Continue' (F5), Wing does not progress to breakpoints and stops debugging. 'Debug>  Step over' (F6) seems to work if I start debugging with 'Step Into' instead of 'Start/Continue'.
>
> Now I am really confused as to why 'Debug>  Start/Continue' is not working.

A common problem here is not adding the code needed at the top level of 
the tutorial module, as described earlier in the tutorial (in the 
Introduction to the Editor section).  You need to type in this at the 
end of the example1.py file:

news = ReadPythonNews(GetItemCount())
PrintAsText(news)
PrintAsHTML(news)

Without this Python just evaluates the top-level of the module w/o 
actually invoking anything.

Please let us know if this doesn't explain it.

Thanks,

-- 

Stephan Deibel
Wingware | Python IDE
Advancing Software Development

www.wingware.com


More information about the wingide-users mailing list