Hi everyone, welcome to the October update of Visual Studio Code Java. We have brought a lot of improvements in code editing and debugging experience this time, so let’s get started!
Debugging Experience Enhancements
Visual indicator for inline breakpoints
Consider a line like this:
Stream.of(“Frank”).map(name -> name.toUpperCase()).forEach((item -> System.out.println(item));
Now when you set a breakpoint on this line, Visual Studio Code will automatically identify the lambda expressions in this line, and visualize them with grey dots. If you want to further set inline breakpoints on those lambda expressions, you can directly click on those grey dots, and the grey dots will turn into red dots like normal breakpoints, then the debugger will stop at these breakpoints during the code execution. This will provide you much easier debugging experience for these lambda expressions. Here’s a quick demo.
Support Java virtual threads
Java 19 brings the first preview of virtual threads to the Java platform; This is the primary deliverable of Project Loom. Virtual threads are designed to significantly boost the scalability of concurrent Java programming while making little change to the current API. In our September release, we have enabled the support for virtual threads in our Java debugger. Note that you will need to install JDK 19 to use this feature. Here’s a screenshot of our debugger in action.