Article Preview
Buy Now
COLUMN
Debugging Basics 2
Exploring Xojo's Debugger
Issue: 20.3 (May/June 2022)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 18,762
Starting Page Number: 64
Article Number: 20307
Resource File(s):
project20307.zip Updated: 2022-05-05 14:12:09
Related Link(s): None
Excerpt of article text...
Last issue I began exploring the world of debugging, despite not being an expert on the subject. I mentioned that one of my main methods of debugging is printing out the contents of variables (let's call that "brute force" debugging).
Sadly, I still do that, though I have gotten somewhat used to using Xojo's debugger, adding breakpoints, and stepping through code to see what's happening live. However, I'm never entirely comfortable with that process as I'm unsure of what I'm doing. Code sometimes doesn't work—it produces unexpected results—and since I'm not sure where the trouble lies, I don't know where to look in the debugger.
Also, I have sometimes heard pro Xojoers complain about various aspects of Xojo's debugger and I have no idea what they're talking about. I certainly never run into those particular limitations, which must mean I'm doing something wrong, right?
But let's get started by exploring what I know about the debugger.
Starting With Stopping
One key problem with "brute force" debugging is that your program is always running, perhaps moving on to other things. It's quite possible the actual error occurred earlier on in the program, but by the time you notice it, a different section of code is executing.
...End of Excerpt. Please purchase the magazine to read the full article.