Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 19 in printed book and digital formats -- plus a one-year subscription (beginning with 20.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 20.3 ('XDC Anywhere')
Instant purchase and download via GumRoad!

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):

Download Icon 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.