Watchpoints are available in PalmDebugger ('ss' short for step spy). David
Fedor described how to use this in the last PalmSource. It's slow, but it'll
tell you any time that variable is written to.
Another approach is to temporarily replace all writes to the variable with
function calls to a simple setter function at which you can set a
breakpoint. You can even include the condition in there in the code if you
like. A bit of a pain, but it'll run nice and fast, which might make up for
the extra coding time.
Before doing either of these, hook up POSE to PalmDebugger so you can get a
stack dump when Gremlins hits the problem. That might be all you need to
figure out your problem.
Finally, consider whether you're allowed to access globals at the point
where you're having the problem. What launch code are you in? One way to
find out: put a breakpoint in PilotMain using PalmDebugger. Another way:
write something to the HotSync log in PilotMain, then let Gremlins run until
you hit the error, then go look in the log.
That should give you some food for thought.
--
Peter Epstein
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/