Skip to content

Commit

Permalink
fixes openwallet-foundation#3182: migrate from ptvsd to debugpy
Browse files Browse the repository at this point in the history
Signed-off-by: Ricky Ng-Adam <[email protected]>
  • Loading branch information
rngadam committed Aug 19, 2024
1 parent 277e958 commit 72f3e79
Show file tree
Hide file tree
Showing 3 changed files with 366 additions and 321 deletions.
12 changes: 6 additions & 6 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
import debugpy

ptvsd.enable_attach()
print("ptvsd is running")
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 72f3e79

Please sign in to comment.