Remote debuging in Pyttols 2.0 Alpha

Mar 28, 2013 at 9:44 AM
Is the remote debugging feature discussed hear Remote debugging API design review is implemented in 2.0 Alpha.
I'm really looking forward for this feature.
Mar 28, 2013 at 11:43 AM
I managed to import the "ptvsd" package in my project. I'm not sure is it possible at all to debug a python application which runs through Apache as CGI.
Mar 28, 2013 at 4:09 PM
Yes, it is implemented in alpha, and there is documentation on setting it up, which might help with some common issues:

Debugging a regular CGI application would be tricky, however, because a separate process is created to handle every new request, and is torn down at the end of that request. So you have an impossibly short time window to attach to your process (and you cannot extend it, since otherwise the server will likely decide that its timed out).

If you're using FastCGI, on the other hand, your Python process should stay around for a while, which should make it possible to attach.
Mar 29, 2013 at 8:00 AM
I managed to start and connect to a debug session. :) And yes, it is tricky to catch the exact time when the debug process is up. :)
And something else, the "Find" button in the "Attach to process" window is completely misleading. I thought that I have to press so the "Available Processes" list to be repopulated. Next time I will look more close the docs page, this will save me a couple of hours :)
Mar 29, 2013 at 6:52 PM
The experience around "Find" is definitely subpar right now. It's the standard server browser that regular (C++, C# etc) attach is using, so it's completely useless for Python remote debugging.

I think I've found a way to disable it to avoid confusion. Long-term, we'll probably want to add our own server browser for local debugging servers.