I am newbie to Grafana, I have installed Grafana and did all the instructions given in the read me file. I'm using Visual Code for go lang now I just want to debug the Grafana code so that I can understand the process.
Can any one suggest me what I have to do. I have heard of debugger called Delve. Can any one tell me how to use it because when I use Delve it doesn't connect grafana server.
how to start the grafana-server and how to debbugging the code .Please any one help me out!!! and i want to contribute some thing to grafana!!!
I Have followed following Links : https://github.com/grafana/grafana , https://github.com/derekparker/delve
I am not sure, have not had to debug golang yet.
please search on google or post questions to the Grafana mailing list
I also encountered the problem.
I got it to work by editing .vscode/launch.json:
{
// 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": "Launch",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/pkg/cmd/grafana-server/main.go",
"env": {},
"args": [
"--homepath", "${workspaceFolder}",
"--packaging", "dev"
]
}
]
}
Most helpful comment
I got it to work by editing .vscode/launch.json: