Add documentation for setting up debugging in VSCode (#29987)

pull/38071/head
Raymond Chen 4 years ago committed by GitHub
parent 2fe62af685
commit befdfedfb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      devenv/README.md
  2. 21
      devenv/vscode/launch.json

3
devenv/README.md vendored

@ -55,6 +55,9 @@ Jaeger block runs both Jaeger and Loki container. Loki container sends traces to
| 1.0 | graphite1 | 8280 | 2203 | 2203 | | 1.0 | graphite1 | 8280 | 2203 | 2203 |
| 0.9 | graphite09 | 8380 | 2303 | 2303 | | 0.9 | graphite09 | 8380 | 2303 | 2303 |
## Debugging setup in VS Code
An example of launch.json is provided in `devenv/vscode/launch.json`. It basically does what Makefile and .bra.toml do. The 'program' field is set to the folder name so VS Code loads all *.go files in it instead of just main.go.
## Troubleshooting ## Troubleshooting
### Containers that read from log files fail to start (Mac OS) ### Containers that read from log files fail to start (Mac OS)

@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "grafana-server",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/pkg/cmd/grafana-server",
"env": {},
"args": [
"--homepath=${workspaceFolder}",
"--packaging=dev",
"cfg:app_mode=development",
]
}
]
}
Loading…
Cancel
Save