Debug Java Stream in Intellij Idea


Stream is a very powerful feature. it allows you to take full advantage of modern multi-core architectures and lets you process data in a declarative way. 

Unfortunately stream API may sometimes be difficult to debug. This happens because they require you to insert additional breakpoints and thoroughly analyze each transformation inside the stream. 

IntelliJ IDEA provides a solution to this by letting you visualize what is going on in Java Stream operations.

Just install plugin called “Java Stream Debugger”.

Once you have enabled this plugin you can simply debug your code. This plugin will bring a trace icon (Trace Current Stream Chain button).  

Trace Current Stream Chain button


Once you click on that icon you get the visualization of your stream pipeline. 

For every stream operation, we have got a dedicated tab. you have to switch to the relevant tab to understand what it is doing. 




Comments

Popular posts from this blog

Creating Efficient Docker Images with Spring Boot 2.3

CRUD Goes Even Easier With JPABuddy