Debugging Crossplane using VS Code

Prerequisite

Local Debug

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

Remote Debug

Start Delve on remote machine

dlv debug ./cmd/provider --headless --listen=:2345 --log --api-version=2 -- --debug

Launch remote debugging on local machine

{
"name": "Launch remote",
"type": "go",
"request": "attach",
"mode": "remote",
"remotePath": "/path/to/provider/root/directory",
"port": 2345,
"host": “192.168.0.101”,
"trace": "verbose"
}

Troubleshooting

--

--

--

Life is coding and writing! I am a software engineer who have been in IT field for 10+ years. I would love to write beautiful code and story for people.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Stay On Target By Defining Software Requirements Using Events

More about search as a service

Implementing an O(1) — LRU Cache

O(1) — LRU Cache

Refactoring Ifs statements

CHEF Installation & Configuration

March 2018: GitHub Development Winners

MongoDB schema design for SQL developers — NexoCode Blog

How to Adapt with the Adapter Design Pattern

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
MorningSpace

MorningSpace

Life is coding and writing! I am a software engineer who have been in IT field for 10+ years. I would love to write beautiful code and story for people.

More from Medium

Argo CD Basics— CNCF Roadmap

Gateway = Ingresses & LoadBalancer?

Kiali releases 1.44 and 1.45: Features update

How to create a dynamic development environment using Kubernetes namespaces and ArgoCD