Page 1 of 1

Looking for debugging tips

Posted: Thu Jun 02, 2022 2:54 pm
by gg12
Hi,
I'm looking for tips for debugging.
I use single breakpoint then I launch my app, it stops and I check the variables without problems.
However when there are loops, it's a bit harder to keep up, I put at the last line of the loop:

Code: Select all

wait while the commandkey is up
wait 48 
I feel like it doesn't show the variables evolutions.
Do you have better tips for debugging? / More efficient ways? / How do you like to debug? / Do you have the golden steps for debugging?

Thanks in advance, gg

Re: Looking for debugging tips

Posted: Thu Jun 02, 2022 3:04 pm
by Klaus
Hi gg12,

welcome to the forum!

I can recommend these stacke to learn more about the LC basics.
There is also a stack devoted to "Debugging", that may help.
http://www.hyperactivesw.com/revscriptc ... ences.html

Best

Klaus

Re: Looking for debugging tips

Posted: Thu Jun 02, 2022 7:04 pm
by dunbarx
Hi.

If you set a breakpoint in a loop, you will see the values of all variables at that point. Then you must either step through each line or "run" the code until the next pass through the loop, where execution will stop again, and you can examine the variables once more.

Do you know how to use the debugger that way?

This is standard procedure, and can be tedious, depending on how the loop is built. Know also that you can set a "watchPoint" instead of a breakpoint, which will stop execution based on the values of variables, so you only need to look at the loop when certain criteria are met.

Craig