IntelliJ IDEA 2017.3: Debugger Improvements
As usual, the latest release of IntelliJ IDEA comes with improvements to help with debugging applications.
New Overhead Tab
Debugging an application comes with an inevitable cost. While we may know this, it’s not always obvious what this might be. IntelliJ IDEA 2017.3 comes with a way to visualize this cost. There’s now a new tab, Overhead, which gives a view of the cost of debugging. If you don’t see this in the Debugger Tool Window, you may need to click the “Restore Overhead View” button:
As you can see, this window shows how much time was spent stepping over code, or rendering values with custom Type Renderers in watches and variables. Seeing this overhead may help you to understand the difference in behavior between running and debugging your application, and will help you reduce unnecessary performance costs when debugging.
On-Demand Data Renderers
Given that using Type Renderers can be a source of overhead while debugging, there’s a new feature that can reduce or eliminate this cost. By using on-demand data renderers, the value for the type will only be calculated when the watch or variable is clicked on rather than being evaluated automatically all the time.
In the GIF below, you can see the Product renderer takes quite a lot of time (relatively speaking). If you set this to “On Demand” in Settings | Build, Execution, Deployment | Debugger | Data Views | Java Type Renderers, the renderer will not be used automatically; only clicking on that value in the Variables view will trigger the renderer.
Alternatively, you can turn off all the type renderers by right clicking and selecting Mute Renderers.
This persists between debug sessions, so when you want to turn them back on again all you have to do is right click again and untick Mute Renderers.
IntelliJ IDEA 2017.2 had a separate plugin to help you see what was going on in Java 8 Stream operations. This functionality is now bundled in IntelliJ IDEA 2017.3 and available by default from the debug window.
This tool is a really useful way to understand which operations are happening and how it impacts the data being processed.
Click here to learn more about the Java Stream Debugger.
IntelliJ IDEA 2017.3 has improved functionality for debugging asynchronous code via the introduction of a new Instrumenting Agent. This is enabled by default:
This makes debugging asynchronous code easier and reduces the overhead.
For more information about this feature, check out the JVM debugger section of this blog post.
Configurable Command Line Shortener
IntelliJ IDEA has a number of different ways to shorten the command line used to run or debug your application if you have a very long classpath or a lot of VM arguments. In IntelliJ IDEA 2017.3, we’ve made these options available for the user to choose according to the specific requirements of their application.
Read this blog post for more detailed information on this feature.
So you can see there’s a whole range of new and updated features in IntelliJ IDEA 2017.3 which make debugging easier, faster, and help you visualize more of what’s happening inside your application.
Subscribe to Blog updates
Thanks, we've got you!
The What, Why, and How of JPA Buddy in IntelliJ IDEA
Master JPA entity management with JPA Buddy in IntelliJ IDEA! Our latest article shows you how to simplify your workflow and reduce boilerplate code.
The Best of IntelliJ IDEA’s HTTP Client
In today's fast-paced tech world, easy and efficient management of web services and APIs is crucial. That's where IntelliJ IDEA's HTTP Client steps in, turning complex HTTP requests into a walk in the park. The HTTP Client is a feature-rich, text-based tool in IntelliJ IDEA Ultimate. It seamlessl…
Import Postman Collections to the HTTP Client
We know that many of you use Postman collections and want to stay in the flow while working with them. This means staying inside IntelliJ IDEA and not switching to a different app. Great news! You can now effortlessly transform Postman collections into .http and use them in the HTTP Client …
What’s New in IntelliJ IDEA 2023.1 for Spring Developers
The IntelliJ IDEA 2023.1 release came packed with updates for Spring. This blog post will highlight the most noticeable changes, including full support for Lombok, a reworked Spring tool window, navigation for Spring Security rules, Spring Security 6 support, and more. Remember that these featur…