Debugging Crossplane using VS Code

Prerequisite

Local Debug

{
"name": "Launch file",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${file}",
"args": [
"--debug"
]
}

Remote Debug

dlv debug ./cmd/provider --headless --listen=:2345 --log --api-version=2 -- --debug
{
"name": "Launch remote",
"type": "go",
"request": "attach",
"mode": "remote",
"remotePath": "/path/to/provider/root/directory",
"port": 2345,
"host": “192.168.0.101”,
"trace": "verbose"
}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store