Android Question conditional "breakpoint" while debugging

clydebamford

Member
Licensed User
Longtime User
Is there any way to pause execution when myvar reaches 10?
I've been using a msgbox to halt execution but its clumsy?
 

clydebamford

Member
Licensed User
Longtime User
of course,doh! , afraid of doevents but could just use log(myvar)
I guess I was hoping for a single line
B4X:
sub breakpoint
Log("breakpoint")
Endsub
If myvar = 10 then breakpoint
Add a breakpoint click next to log and we have a one line solution
thanks!
 
Last edited:
Upvote 0

clydebamford

Member
Licensed User
Longtime User
True, which is why it would be nice if "break" or similar was a key word and part of the ide, surely everbody has come across this? I love b4x and this is really a very minor thing but would have thort it had already been sorted considering how usefull a conditional breakpoint can be!
re doevents, I've never used it so considering erels views on the matter I don't want to start now! Which reminds of another issue, is there a way to break out of a sleep() before it wakes up so that if something unrelated happens and we no longer want to run the code after sleep we can abort?
 
Upvote 0
Top