How can i debugging backend code with VScode?


#1

hello,
i vscode user, i want to debugging backend code(go, macaron code).
but i’m not found any example in community and github.
if it is possible that debugging in vscode , could anyone tell me?

thank you for reading


#2

If you were doing a plugin development,it may help you:
/yourpanelpath/.vscode/launch.json:
{
“version”: “0.2.0”,
“configurations”: [
{
“type”: “chrome”,
“request”: “launch”,
“name”: “test Chrome”,
“url”: “http://localhost:your port”,
“webRoot”: “{workspaceFolder}", "sourceMaps":true, "pathMapping": { "/public/plugins/your panel name": "{workspaceFolder}/dist”
},
“sourceMapPathOverrides”: {
“webpack:///./": "${webRoot}/src/”,

        }
    }
]

}


#3

really thank you for your help!
i will use this when i develop grafana plugin

but i’m looking for debugging way grafana server(macaron, go lang) :sob: