From 1cdd3667e957c1aa080f0b6f987771d436b9db6a Mon Sep 17 00:00:00 2001 From: Alexandros Dorodoulis Date: Tue, 16 Oct 2018 10:45:56 +0200 Subject: [PATCH] fix: Fix debug debugger tasks and guide --- .vscode/launch.json | 29 ++++++++-------------------- .vscode/tasks.json | 10 ++++++---- src/debugAdapter/.vscode/launch.json | 6 +++--- src/debugAdapter/Readme.md | 2 +- 4 files changed, 18 insertions(+), 29 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index ecc878a6f..0e9a44279 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,5 +1,5 @@ { - "version": "0.1.0", + "version": "0.2.0", "configurations": [ { "name": "Launch Extension", @@ -7,14 +7,10 @@ "request": "launch", // path to VSCode executable "runtimeExecutable": "${execPath}", - "args": [ - "--extensionDevelopmentPath=${workspaceRoot}" - ], + "args": ["--extensionDevelopmentPath=${workspaceRoot}"], "stopOnEntry": false, "sourceMaps": true, - "outFiles": [ - "${workspaceRoot}/out/**/*.js" - ], + "outFiles": ["${workspaceRoot}/out/**/*.js"], "preLaunchTask": "npm" }, { @@ -22,13 +18,9 @@ "type": "node2", "request": "launch", "program": "${workspaceRoot}/out/src/debugAdapter/goDebug.js", - "args": [ - "--server=4712" - ], + "args": ["--server=4712"], "sourceMaps": true, - "outFiles": [ - "${workspaceRoot}/out/**/*.js" - ] + "outFiles": ["${workspaceRoot}/out/**/*.js"] }, { "name": "Launch Tests", @@ -42,9 +34,7 @@ ], "stopOnEntry": false, "sourceMaps": true, - "outFiles": [ - "${workspaceRoot}/out/**/*.js" - ], + "outFiles": ["${workspaceRoot}/out/**/*.js"], "preLaunchTask": "npm" }, { @@ -66,10 +56,7 @@ "compounds": [ { "name": "Extension + Debug server", - "configurations": [ - "Launch Extension", - "Launch as server" - ] + "configurations": ["Launch Extension", "Launch as server"] } ] -} \ No newline at end of file +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 39582a4b5..a2b6c77c5 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -9,16 +9,18 @@ // A task runner that calls the Typescript compiler (tsc) and // compiles the extension. { - "version": "0.1.0", + "version": "2.0.0", // we want to run npm "command": "npm", // the command is a shell script - "isShellCommand": true, + "type": "shell", // show the output window only if unrecognized errors occur. - "showOutput": "silent", + "presentation": { + "reveal": "silent" + }, // we run the custom script "compile" as defined in package.json "args": ["run", "compile"], @@ -28,4 +30,4 @@ // use the standard tsc in watch mode problem matcher to find compile problems in the output. "problemMatcher": "$tsc-watch" -} \ No newline at end of file +} diff --git a/src/debugAdapter/.vscode/launch.json b/src/debugAdapter/.vscode/launch.json index 9b97692b6..4010ac836 100644 --- a/src/debugAdapter/.vscode/launch.json +++ b/src/debugAdapter/.vscode/launch.json @@ -7,9 +7,9 @@ "request": "launch", "program": "${workspaceRoot}/../../out/src/debugAdapter/goDebug.js", "stopOnEntry": false, - "args": [ "--server=4711" ], + "args": ["--server=4711"], "sourceMaps": true, - "outDir": "${workspaceRoot}/../../out/src/debugAdapter" + "outFiles": ["${workspaceRoot}/../../out/src/debugAdapter"] } ] -} \ No newline at end of file +} diff --git a/src/debugAdapter/Readme.md b/src/debugAdapter/Readme.md index 226a84dbb..c8b42f75c 100644 --- a/src/debugAdapter/Readme.md +++ b/src/debugAdapter/Readme.md @@ -13,6 +13,6 @@ cd vscode-go npm install ``` 2. Open the `vscode-go` folder in one instance. Choose the `Launch Extension` debug target and hit F5 to launch a second instance. -3. In the second instance, open the Go application you'd like to test against. In that instance, create a new Go debug target pointing at the program you want to debug, and add `"debugServer": 4711` in the root of the configuration. +3. In the second instance, open the Go application you'd like to test against. In that instance, create a new Go debug target pointing at the program you want to debug, and add `"debugServer": 4712` in the root of the configuration. 4. Open another instance of Code on the `vscode-go/src/debugAdapter` folder. In that instance hit F5 to launch the debug adapter in server mode under the debugger. 5. Go back to the second instance and hit F5 to debug your Go code. Debuggers from the other two Code windows are attached to the Go debug adapter and the Go language integation respectively, so you can set breakpoints, step through code and inspect state as needed.