From a75f0e0db2f1a341a365a0aa600b723db6d66d6e Mon Sep 17 00:00:00 2001 From: Catalin Stratulat Date: Thu, 5 Dec 2024 17:18:25 +0000 Subject: [PATCH 1/3] adding example porchctl cmd through launch.json for debugging --- .vscode/launch.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index 980b6f76..a5af03c4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -36,6 +36,17 @@ "ENABLE_PACKAGEVARIANTSETS": "true" } }, + { + "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=default", "--repository=repo-name" + ], + "cwd": "${workspaceFolder}" + }, { "name": "Launch test function", "type": "go", From b398878fa5f4e17e4c1871034c22f51de2130f37 Mon Sep 17 00:00:00 2001 From: Catalin Stratulat Date: Thu, 5 Dec 2024 17:26:57 +0000 Subject: [PATCH 2/3] changed repo namespace --- .vscode/launch.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index a5af03c4..20e6c694 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -43,7 +43,7 @@ "mode": "auto", "program": "${workspaceFolder}/cmd/porchctl/main.go", "args": [ - "rpkg", "init", "porch-package-name", "--workspace=v1", "--namespace=default", "--repository=repo-name" + "rpkg", "init", "porch-package-name", "--workspace=v1", "--namespace=repository-namespace", "--repository=repo-name" ], "cwd": "${workspaceFolder}" }, From 96a23fddec389b5594c6a6f942fe8a73ca8d2396 Mon Sep 17 00:00:00 2001 From: Catalin Stratulat Date: Wed, 11 Dec 2024 15:22:20 +0000 Subject: [PATCH 3/3] adding comments & instructions to launch.json configurations --- .vscode/launch.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index 20e6c694..443c4e4e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -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", @@ -36,6 +42,10 @@ "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",