To debug your changes on k8s cluster, run:
make deploy-on-k8s DEBUG_SERVICE=true
It will deploy assisted-service in a debug mode together with its components. To connect to the dlv session, you need to connect to assisted-service on port 40000
. For example, in vscode this configuration should do the trick: (after installing go extension and dlv)
{
"version": "0.2.0",
"configurations": [
{
"name": "Remote - debug",
"type": "go",
"request": "attach",
"mode": "remote",
"port": 40000,
"host": "127.0.0.1"
},
]
}
if you wnat to debug remote service, change the "host"
value the the IP
of the host it is running on.