How to use the debugpy.listen function in debugpy

To help you get started, we’ve selected a few debugpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github puremourning / vimspector / python3 / vimspector / developer.py View on Github external
def SetUpDebugpy( wait=False, port=5678 ):
  sys.path.insert(
    1,
    os.path.join( install.GetGadgetDir( utils.GetVimspectorBase() ),
                  'debugpy',
                  'build',
                  'lib' ) )
  import debugpy

  exe = sys.executable
  try:
    # debugpy uses sys.executable (which is `vim`, so we hack it)
    sys.executable = 'python3'
    debugpy.listen( port )
  finally:
    sys.executable = exe

  if wait:
    debugpy.wait_for_client()

debugpy

An implementation of the Debug Adapter Protocol for Python

MIT
Latest version published 4 months ago

Package Health Score

97 / 100
Full package analysis

Similar packages