Apply this patch, run make && make cluster-up && make cluster-sync
, do a port-forward of the virt-controller 40000 port and connect to the remote dlv dlv connect :40000
.
This example shows the steps for the virt-controller but they apply to any binary in KubeVirt.
Let's start by adding the debug compilation options to not optimize the binary.
Edit cmd/virt-controller/BUILD.bazel
as follows.