Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bygui86/go-debug
Sample project on how to debug Go
https://github.com/bygui86/go-debug
Last synced: 2 days 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-30T14:22:10.000Z (about 5 years ago)
- Last Synced: 2024-11-08T06:07:53.423Z (about 2 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