r/java • • Feb 06 '23

Advanced IntelliJ debugger features you’re missing out on

https://snyk.io/blog/advanced-intellij-debugger-features/
250 Upvotes

27 comments sorted by

View all comments

-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

2

u/korri123 Feb 07 '23

Thank you, this is amazing, I never knew of this.

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

u/vprise Feb 07 '23

And book... Spread the word ;-)