B4J Question BreakPoints show but don't stop anything

Dogbonesix

Active Member
Licensed User
Longtime User
I have somehow disabled breakpoints or somehow they don't. They show on the left margin but just get passed by in debug. Anybody got a clue to re enable them? Or, what dumb thing I did and how to fix it?
 

Didier9

Well-Known Member
Licensed User
Longtime User
I posted recently about that issue. It seems many if statements are optimized out so the code does not actually exists and breakpoints on those statements don’t work. Try placing the breakpoint on the statement right after the if statement.It is quite irritating that the tool would let you place a breakpoint that will not work. I assume this is due to the extreme optimizations of the Java virtual machine.
 
Upvote 0

Dogbonesix

Active Member
Licensed User
Longtime User
No luck. I had this Breakpoint issue once or twice on only a certain Subs. I even but 10 breakpoints in a row on Subs that did not work. Did not think much about at first and after a while they started to work. Did not have any other breakpoint issues for about a week and then decided to try the recompile using the obscure option - did not notice anthing different. Keep on coding and for a day or two - then all of sudden NO Breakpoint would work and any edit to an HTML page would not reflect any change. So I had a copy of the app on another computer - where the Breakpoint did work. So I copied the working app to an SD drive and then on my normal laptop. The same problem occurs - breakpoints work on one computer and not on the other. Virus? Corrupt app? So, I'm going to buy a new laptop (mine are getting old anyway) and try a complete new installation of everything.

Thanks for the reply
 
Upvote 0

epiCode

Active Member
Licensed User
same issue :
 
Upvote 0

Didier9

Well-Known Member
Licensed User
Longtime User
So, I'm going to buy a new laptop (mine are getting old anyway)

In my case, breakpoints worked as long as they were not on the line of an if statement, so it probably was a different issue, but buying a new laptop to see if it fixes the problem is definitely worth trying :)
I should have thought about it when I replaced my laptop 3 weeks ago (my excuse was that I really wanted a 4k display, not nearly as good of a justification, as it turned out)
 
Upvote 0
Top