Skip to content

Commit

Permalink
Merge pull request nephio-project#152 from Nordix/run-porchctl-cmd-de…
Browse files Browse the repository at this point in the history
…bugger

Adding launch.json porchctl cmd debugger
  • Loading branch information
nephio-prow[bot] authored Dec 11, 2024
2 parents bde6d72 + 96a23fd commit b2688ed
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",

// A configuration for running the porch server through vscode for the use of debugging.
// Assumes a cluster is set up alongside Git (./scripts/setup-dev-env.sh) and porch components (make ../porch/run-in-kind-no-server) are pre-configured
// With the configuration above one can use Vscode (Run & Debug) and launch server.
// This launches the porch server through vscode outside the cluster and the logs can be viewed in the debug console.
// Breakpoints can be added throughout the porch server code to debug.
"configurations": [
{
"name": "Launch Server",
Expand Down Expand Up @@ -36,6 +42,21 @@
"ENABLE_PACKAGEVARIANTSETS": "true"
}
},
// A configuration for running a porchctl command using the vscode debugger.
// Assumes a cluster is set up alongside Git (scripts/setup-dev-env.sh) and porch components (make run-in-kind) in the /porch directory are pre-configured
// This allows for the running of porchctl commands through vscode outside the cluster and the logs can be viewed in the debug console.
// Breakpoints can be added throughout the porch server code to debug.
{
"name": "Run Porchctl command",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/porchctl/main.go",
"args": [
"rpkg", "init", "porch-package-name", "--workspace=v1", "--namespace=repository-namespace", "--repository=repo-name"
],
"cwd": "${workspaceFolder}"
},
{
"name": "Launch test function",
"type": "go",
Expand Down

0 comments on commit b2688ed

Please sign in to comment.