[wingide-users] auto restart for django
Wingware Support
support at wingware.com
Thu Jan 24 09:55:25 EST 2013
brian downing wrote:
> I noticed in the django doc it has a section “Debugging with
> Auto-reload”. Is there a way I can avoid adding “import wingdbstub” to
> every file? I don't want to have to edit this out for production and I
> don't know which file is the problem till I start debugging.
>
>
> Currently while I'm in writing/testing mode I run the django server
> stand alone so I don't have to keep restarting the debugger. If I need
> the debugger, I'll stop the stand alone server and launch within wing
> so I can use the debugger. I was hoping there was a better way than
> switching between command line server and the wingware debugger.
>
The 'import wingdbstub' can be anywhere and debugging continues for the
life of the process or until the IDE disconnects or you use the
debugging API to stop debugging. You could either put it in the Django
code that runs early when starting the server, so it gets run whenever
Django restarts for reload, or you could put it somewhere that you can
invoke on demand to start debugging (such as a page handler for a
special start_debug page you can load in your browser). I'd recommend
the first of these two options, so you are always running under the
debugger while developing and debugging sets itself up automatically
after each auto-reload.
--
Stephan Deibel
Wingware | Python IDE
Advancing Software Development
www.wingware.com
More information about the wingide-users
mailing list