r/java • u/lirantal • Feb 06 '23
Advanced IntelliJ debugger features you’re missing out on
https://snyk.io/blog/advanced-intellij-debugger-features/4
u/BigBad0 Feb 06 '23
Jeez bookmaring to test the "Customize Data Views" option. Thx for sharing u/lirantal
2
2
41
u/Wise-old-mandalorian Feb 06 '23
Very cool! Being able to track objects trough a debugging session is going to save me a lot of headaches!
I feel like debugging is often overlooked, or something developers aren't as good at as other parts of the job. Which is a shame because proper debugging can save so much time.
10
u/danskal Feb 06 '23
In my experience most people haven't even dreamt of what is possible with Idea.
3
u/colouredmirrorball Feb 06 '23
Those are great and I'm definitely using them tomorrow!
Also shoutout to my button "debug streams". It visually displays what's going on in your streams.
-1
u/korri123 Feb 07 '23
Debugging experience with IntelliJ/Java is still pretty painful compared to Visual Studio/C++. Where are the hardware write breakpoints? (Break when this value changes)
4
u/vprise Feb 07 '23
These are available in Java and work at the VM level which maps to interrupts just like Visual Studio. You can break on field changes (watchpoints) which you can see in the course/book linked from the article.
Visual Studio has a great debugger (unlike VS Code).
0
u/korri123 Feb 07 '23
I knew about field points yeah, but they haven't proved any useful for me. For example of a use case, if I want to monitor when a specific ArrayList changes size in a large complex application, I don't want the debugger to break every time some other array list also changes size, as that might happen all the time! Maybe I'm misunderstanding how it works and you can do it for specific fields of specific instances but I haven't found any way to do it in IntelliJ.
5
u/vprise Feb 07 '23
Instance filters are covered here: https://debugagent.com/the-massive-hidden-power-of-breakpoints
2
2
u/vprise Feb 07 '23
You can use an instance filter for that... I suggest checking out the first part of the course which is free and includes all of those details.
2
u/korri123 Feb 07 '23
Just checked it out, this is what I've been looking for all this time! Thanks so much, I'd been Googling it and there was almost no documentation about it. Awesome course.
3
-1
u/dadmda Feb 06 '23
Too bad I have to use eclipse, on the other hand I’d rather have eclipse open with multiple projects than multiple IntelliJ windows
54
u/colin_7 Feb 06 '23
Love IntelliJ best Java IDE out there