<p>I have experience using Docker to develop a relatively complex application.  It is very easy to debug an app using Visual Studio (2019).  I just set docker-compose.yaml as the startup app and start debugging.</p>

<p>Is it possible to debug an application that is published to Kubernetes locally using Docker Desktop? By debug I mean set breakpoints etc? I have spent a few hours Googling this and I have got nowhere and hence the reason for the question.</p>

<p>Please note that I am not asking how to debug an app that is published to Kubernetes in the Cloud e.g. Azure - there are plenty of webpages that explain how to do that.</p>

w0051977
<p>Assuming the image uses a Java CMD, include the standard debug JVM arguments (<a href="https://stackoverflow.com/q/138511/2568649">What are Java command line options to set to allow JVM to be remotely debugged?</a>), then expose the debug port when running a container, and in IDE set up a remote debug session on that port once the container starts up.</p>
