Grafana: how to do grafana code debug..

Created on 22 Jul 2016  路  3Comments  路  Source: grafana/grafana

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

typquestion

Most helpful comment

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"
            ]
        }
    ]
}

All 3 comments

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"
            ]
        }
    ]
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ADeane6 picture ADeane6  路  3Comments

SATHVIKRAJU picture SATHVIKRAJU  路  3Comments

kcajf picture kcajf  路  3Comments

royemmerich picture royemmerich  路  3Comments

deepujain picture deepujain  路  3Comments