vscode launch.json example

234 views
Skip to first unread message

Tim Black

unread,
Apr 5, 2018, 1:21:35 AM4/5/18
to TurboGears

Does anyone have a working example of how to configure Visual Studio Code's launch.json to debug a TurboGears app?

I've configured mine to the point where I can debug gearbox, but haven't figured out how to actually debug my app.  Since I use gearbox to serve the app, my launch.json contains the following:

"program": "${workspaceRoot}/bin/gearbox",

I also tried pointing that at app.wsgi.  Neither seems to give me an entry point to my application, and neither actually does what I need it to do:  hit my breakpoints when a request comes into the app.  How can I get it to do that?

Tim

Alessandro Molina

unread,
Apr 5, 2018, 9:22:49 AM4/5/18
to TurboGears
I never tried to use VisualStudio Code to debug, but I generally make sure that you are not providing `--reload` option is in the launcher command. That will make impossible to attach a debugger to the application.

Apart from that debugging a TG app is pretty much like debugging any other WSGI app. I used PyCharm for debugging without any major change.

--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+unsubscribe@googlegroups.com.
To post to this group, send email to turbo...@googlegroups.com.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages