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 20, 2024
1 parent f98709c commit ad36896
Show file tree
Hide file tree
Showing 3 changed files with 367 additions and 322 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 ad36896

Please sign in to comment.