In my previous article, I shared with you the steps I took, to further automate setting up my demo environment, and implementing a Service with service type LoadBalancer.
[Quarkus – Kubernetes extension (reinvestigated, part 5), implementing a Service of service type LoadBalancer with K3s]
Some years ago, I also wrote articles about the Quarkus Kubernetes Extension.
This time I wanted to have a look at some others aspects of the Quarkus Kubernetes Extension, that I came across.
Part of the “Developer Joy” is the so called “Remote Development”.
Run dev mode remotely with changes to local files immediately available in a containerize environment.
Read the Remote Development Mode guide
[https://quarkus.io/developer-joy/]
But first I wanted to have a look at remote debugging.
To remotely debug applications that are running on a Kubernetes environment, we need to deploy the application in a particular way.
[https://quarkus.io/guides/deploying-to-kubernetes#remote-debugging]
Warning:
Do not use this in production. This should only be used in a development environment. You should not run production application in dev mode.
[https://quarkus.io/guides/maven-tooling#dev-mode/]
In this article, you can read more about the steps I took to remotely debug a Java application that is running in a container on a Kubernetes cluster in my already existing Linux demo environment, including Quarkus and K3s (a lightweight certified Kubernetes distribution) and setup via Vagrant.
In a next article, you can read more about using development mode remotely, so that you can run Quarkus in a container environment and have changes made to your local files become immediately visible.
Remote JVM debugging a Java application directly on my Windows laptop
In order to learn more about the remote JVM debugging part, I had a look at: IntelliJ IDEA tutorial: Remote debug
Below you see the overview of this tutorial (that uses a class named Alphabet):
Remote debugging lets you control and inspect a Java program running on another machine as if it were local.
To do this, you first start the application on the remote computer and configure it to accept debugger connections by adding a special VM option. This option makes the remote JVM wait for incoming connections from a debugger.
Once the remote app is up and listening, you use your local machine to start a debugger in “attach” mode. This connects the IntelliJ IDEA’s debugger to the remote application over the network, allowing you to debug it.
For simplicity, we will launch the debugger and the host application on the same computer. The steps, however, are identical for debugging that is actually remote, so you will be able to use the same procedure for both scenarios.
[https://www.jetbrains.com/help/idea/tutorial-remote-debug.html]
I first wanted to try out the example from that tutorial directly on my Windows laptop using the IntelliJ IDEA (with the Java 25 JDK).
Following the tutorial, I set some breakpoints in the source code of the Alphabet class.
