how to watch variables in remote debugging rpi

Remote debugging is working well on my Rpi dev, but I haven’t figured out how to watch variables. The ‘Stack’ and ‘Variables’ panes are empty. Thoughts? Thx!

have you set a breakpoint?

There’s no automatic watch-breakpoint function You have to add it in code. I usually add something like this:

#if debugbuild //Compiler directive If iSomeVariable = 0 then //What am I looking for? break //This shouldn't happen! end #endif

Another neat trick is to convert a property you want to watch into a Computed Property, then set a breakpoint in “Set”.

So what happens when I just want to ‘watch’ a variable? For instance, I have a device that is sending serial packets which I’m capturing and putting into an array. I’m then using a timer of fixed duration to systematically grab the element(0), push it thru to an industrial network, remove that element from the array, then on next round it repeats.

The array gets stacked with entries that come in anywhere from 999ms to 1100ms and other variations. My goal is to watch the .ubound of the array to see if the throttling of the system is ever going too slow, and if elements are stacking up.

I’d like to watch a variable that is keeping track of the array, or watch the array itself to see if the system is able to keep up.

That may be a little TMI, but ideally this means no ‘breakpoints’ since timing of a 3rd-party attached serial device can’t be interfered with.

So is there a way to watch a value change dynamically? (naturally I could put this in the UI somewhere, but that defeats my use of a debugger!)



I usually create a debug window showing the values I want to track specifically. Either that or use System.debuglog. There is no ideal solution so use what makes sense for you. Xojo doesn’t have a Watch feature so you’ll have to come up with your own way of doing it.

Thank you Greg, Kem, and Bob! Sorry to hear that there isn’t an inherent way to watch values - I think I must have seen that feature in the Android Studio IDE, or somewhere else - nevertheless I appreciate your time!

The amount of traffic for such a live view of variables would be an issue (never mind the speed)
Not so bad if the Pi is right on your desk & on the same network
A whole lot different if its accessible over the internet & you’re remote debugging it truly “remotely” (which is possible)

Totally understand - but I’d hate to have not asked and then years from now find out I’ve been missing out on one of life’s great short cuts!

Nope, the question was good and there’s a fairly high ranking Feedback report for it. <>