Visual Studio has great python support via the Python Tools for Visual Studio: http://pytools.codeplex.com/
Debugging python code in Visual Studio works as expected. I set up a lighttpd server on my local Windows machine, and I have python scripts running as cgi scripts. I would like to be able to debug these in Visual Studio (running on the same PC) when running from lighttpd.
I am able to debug the cgi scripts using: http://winpdb.org But I would prefer Visual Studio.
According to this question: How to debug a remote python application with (Python Tools for) Visual Studio?
It is implied there is almost a way, but I don't see a specific way to set a breakpoint and have it debugged in VS.
Figured it out. This does work, and works pretty well, once you get the steps down.
Add a delay to the python source file like this:
time.sleep(10)
This is necessary if you are not using FastCGI, as the python process is probably going to start and finish long before you can attach to it. I assume this would be different with FastCGI, but I haven't reached that stage yet.
I added a short macro to the Visual Studio IDE that automates the procedure of attaching to pythonw.exe. I'll share that if anyone is interested.