Debugging SQLite

Hi everybody,

When I get an SQLite exception, the IDE seems not to highlight the line of Xojo code that caused the exception (just shows a blank screen with no code), and in fact it doesn’t even highlight the exception, leaving me to navigate through the variables window to find it. Is this normal? It makes figuring out which SQL statement crashed my code rather difficult.

What Xojo version and OS?

Xojo 2023 R1.1 on MacOS Ventura.

If you create a test with

Var db As New SQLiteDatabase

db.Connect

db.ExecuteSQL "SLECT wrong"

db.Close

image

Don’t you see this:

Here is what I see on the crash.

:point_up_2:t2: Is this the result for my test?

image

Yes.

2023-08-10_15-16-44

Try using the latest release, R2. If this bug is still the same, report the bug.

I notice that your stack trace is weirdly on the Event Loop

And the variable inspector is on the Globals selection instead of Variables.

Also make sure “Break On Exceptions” is checked.

1 Like

Ok, but it should crash with an exception, but it is frozen in the loop.

1 Like

That is very strange, testing Rick’s code Xojo2023r1.1 macOS Ventura, no ‘Break On Exceptions’ I get this:
image

After clicking OK it goes back to the IDE code editor.

Something is making your Xojo installation fail when debug.

1 Like

Weird. It’s only on database exceptions. Other exceptions work as expected.

Test with R2

Is your ok, Alberto?

Are you both using 13.5 ? The latest stable Ventura?

Will do. I’m on mobile data at the moment so I can’t spare the bandwidth to download it but will give it a try when I get to proper wifi.

I’m on 13.1. Something is wrong with my MacOS and it has lost the ability to successfully update. Will need to do a full wipe of this thing but I’m too busy at the moment.

The bug has been fixed for the latest version of Xojo.

https://tracker.xojo.com/xojoinc/xojo/-/issues/65265

3 Likes

@Beatrix_Willius Are you kidding me? A bug that has existed for two years got a fix the literal day I experienced it? I need to buy a lottery ticket, haha.

Thanks for the note. I have upgraded my Xojo to 2023 R2 but database code isn’t on the agenda for today so I haven’t yet seen the fix.