https://github.com/bygui86/go-debug
Sample project on how to debug Go
https://github.com/bygui86/go-debug
Last synced: 4 months ago
JSON representation
Sample project on how to debug Go
- Host: GitHub
- URL: https://github.com/bygui86/go-debug
- Owner: bygui86
- License: apache-2.0
- Created: 2019-08-16T11:19:23.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-30T14:22:10.000Z (over 5 years ago)
- Last Synced: 2024-12-31T01:43:31.376Z (6 months ago)
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sample project on how to debug Go
## Delve
### Debug application
1. Compile and run the application in "debug mode"
```
dlv debug
```2. Follow instructions to navigate
### Debug test
1. Compile and run the test in "debug mode"
```
dlv test ./domain/
```2. Follow instructions to navigate
---
## VS Code
1. Open the project into VS Code using cli (or manually)
```
cd go-debug/
code .
```2. Open a file and place a breakpoint
3. Click on the left icon "Debug"
4. Choose the mode "Debug" from the top dropdown
---
## Links
* https://github.com/go-delve/delve
* https://github.com/go-delve/delve/blob/master/Documentation/cli/getting_started.md
* https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-code-using-VS-Code
* https://scotch.io/tutorials/debugging-go-code-with-visual-studio-code