Grafana: grafanaコードのデバッグを行う方法。

作成日 2016年07月22日  ·  3コメント  ·  ソース: grafana/grafana

私はGrafanaの初心者です。Grafanaをインストールし、readmeファイルに記載されているすべての手順を実行しました。 golangにVisualCodeを使用していますが、プロセスを理解できるようにGrafanaコードをデバッグしたいだけです。
誰かが私がしなければならないことを私に提案できますか? Delveというデバッガのことを聞いたことがあります。 Delveを使用すると、grafanaサーバーに接続されないため、使用方法を教えてもらえますか。
grafana-serverの起動方法とコードのデバギング方法。誰か助けてください!!!

次のリンクをたどっています: https//github.com/derekparker/delve

typquestion

最も参考になるコメント

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

全てのコメント3件

よくわかりませんが、まだgolangをデバッグする必要はありません。

Googleで検索するか、Grafanaメーリングリストに質問を投稿してください

私も問題に遭遇しました。

.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"
            ]
        }
    ]
}
このページは役に立ちましたか?
0 / 5 - 0 評価