Skip to content

Commit

Permalink
feat: add snippet for debugpy remote attach (#397)
Browse files Browse the repository at this point in the history
useful on remote debugging, especially on slurm
  • Loading branch information
lljbash committed Feb 12, 2024
1 parent 7d5f845 commit a227a1a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions snippets/python/debug.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,15 @@
"Pretty print": {
"prefix": "pprint",
"body": "__import__('pprint').pprint(${1:expression})$0"
},
"debugpy remote attach": {
"prefix": "debugpy",
"body": [
"import debugpy, platform",
"debugpy.listen((platform.node(), ${1:5678}))",
"print(f\"debugpy listening on {platform.node()}:$1\", flush=True)",
"debugpy.wait_for_client()$0"
],
"description": "Code snippet for debugpy remote attach"
}
}

0 comments on commit a227a1a

Please sign in to comment.