feat: add snippet for debugpy remote attach (#397)

useful on remote debugging, especially on slurm
This commit is contained in:
Lingjie 2024-02-12 12:35:40 +08:00 committed by GitHub
parent 7d5f845640
commit a227a1aa0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"
}
}