-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add debugger template and instructions
- Loading branch information
1 parent
280e750
commit 12a3995
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## Local debugging with VSCode | ||
Steps outlining how to run MCAD locally from your IDE / debugger. | ||
- Ensure you are authenticated to your Kubernetes/OpenShift Cluster. | ||
- Copy the [launch.json.example](https://github.com/project-codeflare/multi-cluster-app-dispatcher/tree/main/doc/usage/debugger/launch.json.example) file and save it as `launch.json` in the `.vscode` folder in the root of your project. | ||
- In the `launch.json` file, update the `args` sections with the path to your kubeconfig. | ||
- In VSCode on the activity bar click `Run and Debug` or `CTRL + SHIFT + D` to start a local debugging session of MCAD. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
// MCAD Debugger configuration for VSCode | ||
|
||
// 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 MCAD Controller", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "cmd/kar-controllers/main.go", | ||
//"buildFlags": "-race", | ||
"env": { | ||
"DISPATCH_RESOURCE_RESERVATION_TIMEOUT":"120000", | ||
"PREEMPTION":"false", | ||
"DISPATCHER_MODE":"false", | ||
"QUOTA_ENABLED":"false", | ||
}, | ||
"args": ["--kubeconfig", "</path/to/your/kube/config>", "--v", "15", "--logtostderr"], | ||
// This controls the Working directory the code runs in | ||
"cwd": "${workspaceRoot}", | ||
"showLog": true | ||
}, | ||
{ | ||
"name": "Launch MCAD Controller with QuotaManager", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "cmd/kar-controllers/main.go", | ||
"buildFlags": "-race", | ||
"env": { | ||
"DISPATCH_RESOURCE_RESERVATION_TIMEOUT":"120000", | ||
"PREEMPTION":"false", | ||
"DISPATCHER_MODE":"false", | ||
}, | ||
"args": ["--kubeconfig", "</path/to/your/kube/config>", "--quotaEnabled", "true", "--v", "4", "--logtostderr"], | ||
// This controls the Working directory the code runs in | ||
"cwd": "${workspaceRoot}", | ||
"showLog": true, | ||
"port": 8081 | ||
} | ||
] | ||
} |