Skip to content

Instantly share code, notes, and snippets.

@otech-nl
Last active September 22, 2016 08:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save otech-nl/bfa60b7526e4c55d758fd7b9478eba60 to your computer and use it in GitHub Desktop.
Save otech-nl/bfa60b7526e4c55d758fd7b9478eba60 to your computer and use it in GitHub Desktop.
Remote debugging (e.g. using Vagrant) with Flask and Visual Studio Code
if app.debug:
if environ.get("WERKZEUG_RUN_MAIN") == "true": # check to prevent "Address already in use"
import ptvsd
ptvsd.enable_attach("my_secret")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment