Skip to content

Commit 12a3995

Browse files
Add debugger template and instructions
1 parent 280e750 commit 12a3995

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

Diff for: doc/usage/debugger/debugger.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Local debugging with VSCode
2+
Steps outlining how to run MCAD locally from your IDE / debugger.
3+
- Ensure you are authenticated to your Kubernetes/OpenShift Cluster.
4+
- 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.
5+
- In the `launch.json` file, update the `args` sections with the path to your kubeconfig.
6+
- In VSCode on the activity bar click `Run and Debug` or `CTRL + SHIFT + D` to start a local debugging session of MCAD.

Diff for: doc/usage/debugger/launch.json.template

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
// MCAD Debugger configuration for VSCode
3+
4+
// Use IntelliSense to learn about possible attributes.
5+
// Hover to view descriptions of existing attributes.
6+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
7+
"version": "0.2.0",
8+
"configurations": [
9+
{
10+
"name": "Launch MCAD Controller",
11+
"type": "go",
12+
"request": "launch",
13+
"mode": "auto",
14+
"program": "cmd/kar-controllers/main.go",
15+
//"buildFlags": "-race",
16+
"env": {
17+
"DISPATCH_RESOURCE_RESERVATION_TIMEOUT":"120000",
18+
"PREEMPTION":"false",
19+
"DISPATCHER_MODE":"false",
20+
"QUOTA_ENABLED":"false",
21+
},
22+
"args": ["--kubeconfig", "</path/to/your/kube/config>", "--v", "15", "--logtostderr"],
23+
// This controls the Working directory the code runs in
24+
"cwd": "${workspaceRoot}",
25+
"showLog": true
26+
},
27+
{
28+
"name": "Launch MCAD Controller with QuotaManager",
29+
"type": "go",
30+
"request": "launch",
31+
"mode": "auto",
32+
"program": "cmd/kar-controllers/main.go",
33+
"buildFlags": "-race",
34+
"env": {
35+
"DISPATCH_RESOURCE_RESERVATION_TIMEOUT":"120000",
36+
"PREEMPTION":"false",
37+
"DISPATCHER_MODE":"false",
38+
},
39+
"args": ["--kubeconfig", "</path/to/your/kube/config>", "--quotaEnabled", "true", "--v", "4", "--logtostderr"],
40+
// This controls the Working directory the code runs in
41+
"cwd": "${workspaceRoot}",
42+
"showLog": true,
43+
"port": 8081
44+
}
45+
]
46+
}

0 commit comments

Comments
 (0)