Go-Debugging-Vscode | til

submited by
Style Pass
2021-06-28 04:30:04

Next, I created launch.json inside .vscode directory on the root of the repository. The simple way to populate launch.json was to just type go inside “configurations” key and let VSCode auto-populate the config.

To start the debugging, select (or keep the cursor) the main.go file and press F5 or Run -> Start Debugging. Then I called the endpoint that I wanted to debug. Of course, added breakpoints, stepped in etc.

Leave a Comment