Skip to content

Commit

Permalink
issue openwallet-foundation#3182: migrate from ptvsd to debugpy
Browse files Browse the repository at this point in the history
  • Loading branch information
rngadam committed Aug 19, 2024
1 parent d3b5cab commit fd1f61a
Show file tree
Hide file tree
Showing 3 changed files with 444 additions and 399 deletions.
14 changes: 7 additions & 7 deletions aries_cloudagent/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ def init_debug(args):

# --debug to use microsoft's visual studio remote debugger
if ENABLE_PTVSD or "--debug" in args:
PTVSD_HOST = os.getenv("PTVSD_HOST", "localhost")
PTVSD_PORT = os.getenv("PTVSD_PORT", 5678)
try:
import ptvsd

ptvsd.enable_attach()
print("ptvsd is running")
import debugpy
debugpy.listen((PTVSD_HOST, PTVSD_PORT))
print("=== Waiting for debugger to attach ===")
# To pause execution until the debugger is attached:
ptvsd.wait_for_attach()
debugpy.wait_for_client()
except ImportError:
print("ptvsd library was not found")
print("debugpy library was not found")


if ENABLE_PYDEVD_PYCHARM or "--debug-pycharm" in args:
try:
Expand Down
Loading

0 comments on commit fd1f61a

Please sign in to comment.