user1835351
user1835351

Reputation: 1521

Intellij breakpoint not stopping

I have not worked with Intellij or Java before, and tried setting a breakpoint like in the picture below. Is there a reason why my code would not be stopping? I've read other answers about intellij breakpoints, but they were about multithreaded applications. I just downloaded intellij too, so I know I have the newest community version.

enter image description here

Upvotes: 1

Views: 674

Answers (3)

Anton Dozortsev
Anton Dozortsev

Reputation: 4892

No executable code found...

Just init your local variable and debugger suspend on it:

enter image description here

5 line have next code:

Integer count;

Check this guide for more information.

Upvotes: 2

Mind Peace
Mind Peace

Reputation: 915

The declaration itself isn't really executable code - it's just declaring the existence of something. You should breakpoint on Board myboard... which actually does something.

Upvotes: 1

StrekoZ
StrekoZ

Reputation: 618

Try to set a breakpoint in a next row. Java cant stop at lines without any action. You will see check icon in breakpoint when you select a proper line.

Upvotes: 1

Related Questions