Skip to content

Instantly share code, notes, and snippets.

@jannfis
Last active September 20, 2022 13:52
Show Gist options
  • Save jannfis/44318cdf45cd3e3261f707c49dbd0c65 to your computer and use it in GitHub Desktop.
Save jannfis/44318cdf45cd3e3261f707c49dbd0c65 to your computer and use it in GitHub Desktop.
vscode launcher configuration for debugging Argo CD components
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug argocd-server",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/cmd/main.go",
"args": [
"--loglevel=debug",
"--redis=localhost:6379",
"--disable-auth=true",
"--insecure",
"--dex-server=http://localhost:5556",
"--repo-server=localhost:8081",
"--port=8080",
"--staticassets=ui/dist/app"
],
"env": {
"ARGOCD_BINARY_NAME": "argocd-server",
"ARGOCD_TLS_DATA_PATH": "/tmp/argocd-local/tls",
"ARGOCD_SSH_DATA_PATH": "/tmp/argocd-local/ssh",
"ARGOCD_FAKE_IN_CLUSTER": "true",
}
},
{
"name": "Debug argocd-repo-server",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/cmd/main.go",
"args": [
"--loglevel=debug",
"--redis=localhost:6379",
"--port=8081",
],
"env": {
"ARGOCD_BINARY_NAME": "argocd-repo-server",
"ARGOCD_TLS_DATA_PATH": "/tmp/argocd-local/tls",
"ARGOCD_SSH_DATA_PATH": "/tmp/argocd-local/ssh",
"ARGOCD_GPG_DATA_PATH": "/tmp/argocd-local/gpg/source",
"ARGOCD_GNUPGHOME": "/tmp/argocd-local/gpg/keys",
"ARGOCD_FAKE_IN_CLUSTER": "true",
}
},
{
"name": "Debug argocd-application-controller",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/cmd/main.go",
"args": [
"--loglevel=debug",
"--repo-server=localhost:8081",
"--redis=localhost:6379",
],
"env": {
"ARGOCD_BINARY_NAME": "argocd-application-controller",
"ARGOCD_TLS_DATA_PATH": "/tmp/argocd-local/tls",
"ARGOCD_SSH_DATA_PATH": "/tmp/argocd-local/ssh",
"ARGOCD_GPG_DATA_PATH": "/tmp/argocd-local/gpg/source",
"ARGOCD_GNUPGHOME": "/tmp/argocd-local/gpg/keys",
"ARGOCD_FAKE_IN_CLUSTER": "true",
}
}
]
}
@mabhi
Copy link

mabhi commented Sep 20, 2022

@jannfis this vscode launch.json is really helpful. Can you provide some pointers to debug the argo cli binary as well, please. I am looking into an issue in argo cd and that requires cli debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment