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

CS 373 Fall 2021 Week 2: Lauren Warhola

How to Parameterize Dataset for an API Request using postman in Jenkins

JupyterHub in Google’s Cloud Platform with Github OAuth and HTTPS using Helm. Part I

Codespaces with databases

GitHub for Data Scientists: Commit

1-click integration of Matic Widget ERC20 contracts

Private Network with a Raspberry Pi 0 W 2

How To Pass Command-Line Values to a Python Script

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

Using Kubernetes Audit Log to Identify Security Issues

Using GitOps with Flux

Multi-Cloud (Native) “Security Center” — RH ACS — Red Hat Advanced Cluster Security— Overview

Introduction to Kubernetes Security Standards