mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add documentation for setting up debugging in VSCode (#29987)
This commit is contained in:
parent
2fe62af685
commit
befdfedfb6
@ -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)
|
||||||
|
21
devenv/vscode/launch.json
Normal file
21
devenv/vscode/launch.json
Normal file
@ -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…
Reference in New Issue
Block a user