Skip to content

Instantly share code, notes, and snippets.

@bpatra
Created December 5, 2020 23:03
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 bpatra/706f4e0dac2a204b7291ca804a027c36 to your computer and use it in GitHub Desktop.
Save bpatra/706f4e0dac2a204b7291ca804a027c36 to your computer and use it in GitHub Desktop.
import os
import ptvsd
import socket
ptvsd.enable_attach("my_secret", address = ('0.0.0.0', 80))
# Enable the line of source code below only if you want the application to wait until the debugger has attached to it
#ptvsd.wait_for_attach()
ptvsd.break_into_debugger()
cwd = os.getcwd()
print("Hello world you are here %s" % cwd )
print("On machine %s" % socket.gethostname())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment