Created
December 4, 2020 14:57
-
-
Save hydrz/b48bf30f06964fe20886b154bf30e851 to your computer and use it in GitHub Desktop.
vscode go attach process
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 先安装 augustocdias.tasks-shell-input 插件 | |
{ | |
// 使用 IntelliSense 了解相关属性。 | |
// 悬停以查看现有属性的描述。 | |
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch", | |
"type": "go", | |
"request": "attach", | |
"mode": "local", | |
"processId": "${input:processId}", | |
} | |
], | |
"inputs": [ | |
{ | |
"id": "processId", | |
"type": "command", | |
"command": "shellCommand.execute", | |
"args": { | |
"command": "lsof -i :8888 | awk 'NR==2{print $2}'", | |
"cwd": "${workspaceFolder}", | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment