Skip to content

Commit

Permalink
CreatePlugin: Add vscode launch.json files for backend debug mode (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
xnyo authored Mar 20, 2023
1 parent 286c996 commit 65ea603
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ yarn-error.log*
# Generated files
.docusaurus
.cache-loader
docusaurus/docs/signing-your-plugin.md
docusaurus/docs/signing-your-plugin.md

# Allow vscode config inside templates
!packages/create-plugin/templates/*/.vscode
16 changes: 16 additions & 0 deletions packages/create-plugin/templates/backend-app/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Standalone debug mode",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/pkg",
"env": {},
"args": [
"-standalone"
]
}
]
}
2 changes: 1 addition & 1 deletion packages/create-plugin/templates/backend-app/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/{{ kebabCase orgName }}/{{ kebabCase pluginName }}

go 1.19

require github.com/grafana/grafana-plugin-sdk-go v0.155.0
require github.com/grafana/grafana-plugin-sdk-go v0.156.0

require (
github.com/BurntSushi/toml v1.2.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions packages/create-plugin/templates/backend-app/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/grafana/grafana-plugin-sdk-go v0.155.0 h1:i6yQu3RegxxFph2poE2+DOG8EHT1R9LS5WDbTglIhSQ=
github.com/grafana/grafana-plugin-sdk-go v0.155.0/go.mod h1:Wj4WD+sfoUB/q5UG016IvUQBM7HBJaNEAc88b++4szs=
github.com/grafana/grafana-plugin-sdk-go v0.156.0 h1:LPR5gpROmdwkkvm5oGihl0mSKyWNHWIjAjzzTxk3k7M=
github.com/grafana/grafana-plugin-sdk-go v0.156.0/go.mod h1:Wj4WD+sfoUB/q5UG016IvUQBM7HBJaNEAc88b++4szs=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
Expand Down
16 changes: 16 additions & 0 deletions packages/create-plugin/templates/backend/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Standalone debug mode",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/pkg",
"env": {},
"args": [
"-standalone"
]
}
]
}
2 changes: 1 addition & 1 deletion packages/create-plugin/templates/backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/{{ kebabCase orgName }}/{{ kebabCase pluginName }}

go 1.19

require github.com/grafana/grafana-plugin-sdk-go v0.155.0
require github.com/grafana/grafana-plugin-sdk-go v0.156.0

require (
github.com/BurntSushi/toml v1.2.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions packages/create-plugin/templates/backend/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/grafana/grafana-plugin-sdk-go v0.155.0 h1:i6yQu3RegxxFph2poE2+DOG8EHT1R9LS5WDbTglIhSQ=
github.com/grafana/grafana-plugin-sdk-go v0.155.0/go.mod h1:Wj4WD+sfoUB/q5UG016IvUQBM7HBJaNEAc88b++4szs=
github.com/grafana/grafana-plugin-sdk-go v0.156.0 h1:LPR5gpROmdwkkvm5oGihl0mSKyWNHWIjAjzzTxk3k7M=
github.com/grafana/grafana-plugin-sdk-go v0.156.0/go.mod h1:Wj4WD+sfoUB/q5UG016IvUQBM7HBJaNEAc88b++4szs=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
Expand Down

0 comments on commit 65ea603

Please sign in to comment.