1

I recently installed the JRebel plugin for NetBeans and have noticed the following problem when debugging within the IDE:

If I set a breakpoint in a class and change the code afterwards, then my debugger doesn't always hit the breakpoint. I found a workaround: resetting the breakpoint (or reattaching the debugger to project) after reloading the class.

But this solution is not perfect because class is reloaded when app needs it for the first time(debugger doesn't work yet) so I have to make some action which I want to debug two times which can cause so many problems. Another thing is what I can't explain at all.. even when I hit the breakpoint with success, I can't hit another one in another class.

Maybe someone has figured this issue out - ? Is there a way to reload changed classes on save?

NetBeans 7.2.1 with JRebel plugin, Glassfish 3.1.2

zb226
  • 9,586
  • 6
  • 49
  • 79

1 Answers1

2

This is a known issue. The solution exists but not released yet.

Also, please check Options->Java->Java Debugger. Is the "Apply code changes after save" checkbox enabled? If not, could you enable it and try in this configuration - will it make any difference?

Anton Arhipov
  • 6,479
  • 1
  • 35
  • 43
  • hmmm... i turned on this feature and not really noticed any difference. i mean its still able to debug in some scenario. for now it will be enough for me to figure out right scenario. f.e. reload class and then reset brakpoints and attach debugger – user1986658 Jan 20 '13 at 18:41
  • OK, thanks for the info. The debugger-level integration is in works atm. Unfortunately, the breakpoints will not reset the breakpoints as the debugger doesn't "see" the new version of the class that is loaded by JRebel. The integration got spoiled somewhere in transition from 7.1 to 7.2. Fortunately the fix is on its way. – Anton Arhipov Jan 23 '13 at 00:39
  • that's a good news.. but the biggest disadvatage is that debugger is not hitting the breakpoint every time even after class reload.. sometimes i need to reset breakpoint few times or even reattach debugger... – user1986658 Jan 23 '13 at 08:28
  • During a debugging session there is also a button "__Apply code changes__" available in NetBeans (I'm using NetBeans 8.0.2) to synchronize on demand. – Alberto Jan 19 '15 at 17:28