mirror of
https://github.com/rafamadriz/friendly-snippets
synced 2024-09-16 22:14:02 +02:00
feat: add snippet for debugpy remote attach (#397)
useful on remote debugging, especially on slurm
This commit is contained in:
parent
7d5f845640
commit
a227a1aa0c
1 changed files with 10 additions and 0 deletions
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue