Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Netbeans - stops at current program counter but actually no breakpoint was there

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My program stops at a point where it says current program counter,
There is nothing there. No breakpoints nor any annotation.
Why is that?
Thanks
Jack
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to provide more information.
Does this only happen when you run the program in an IDE?
Does this only happen when you run the program in debug mode?
What line of code does it hang on?
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
E Armitage wrote:You need to provide more information.
Does this only happen when you run the program in an IDE?
Does this only happen when you run the program in debug mode?
What line of code does it hang on?


Hi, it happens only in debug mode.
The program always stops at that location,
I have restarted the Netbeans,
Reboot the machine, recompile to no avail
current program counter.png
[Thumbnail for current program counter.png]
 
E Armitage
Rancher
Posts: 989
9
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can remove breakpoints selectively or all of them by using the shortcut Alt + Shift + 5. See if it appears as one of the break points.
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
E Armitage wrote:You can remove breakpoints selectively or all of them by using the shortcut Alt + Shift + 5. See if it appears as one of the break points.


Okay now, thanks it works, I've learned something
 
Ajay Pratap Singh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jacky Luk,

Probabily you worked previously in Eclipse or netbeans is entirely new for you.
You are actually pressing "step out"(CTRL+F7) an arrow button in netbeans, which steps out to next data accessing point. And you are surprised why it stops at places where there is no breakpoint.
Its because you are pressing wrong button. I know in Eclipse it worked like that way but in netbeans you have to press the green play button "Continue"(F5) in order netbeans to reach next breakpoint.

"current program counter in expression" netbeans problem resolved

Best

Ajay Pratap Singh

apts
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic