Problem with the Debugger Step-In Button into a Method

Xojo 2025 r1.1. I’m using the Step-In button when it hits a Method it use to jump to the code in the Method and step through the code then out when finished, Now it’s not it just stays at the Method stepping without jumping to the code. It’s working like the Step Button. It making it impossible to troubleshoot.any of my code. Is there a setting that got changed. I have never experienced this before. Can anyone help with this?

Can you add a Break inside the Method?

Hi Dave - Thanks for your reply. I tried that it breaks outside not inside. I just pulled the code out of the Method and commented it out the call. I’ve been working with Cursor AI. Exporting & Importing XML Files.That’s when the debugger started getting weird. It writes really complex Methods & Functions with non ByRef mixed with ByRef Parameters.

Are-you sure that method is called ?

Add a checkpoint before the line that call the method and see what happens

If Step-in doesn’t work and a break inside the method doesn‘t appear to be respected then this suggests that the method isn’t actually called – for whatever reason.

If the line of code that invokes the method only does so after evaluating a boolean expression in the same line, then step-in will not step in if the expression is false.

e.g.

If foo=True Then DoTheThing()

Or

If foo=True And DoTheThing()=1 Then

In these examples, if foo=False then DoTheThing() is never executed.

1 Like

I have to Step-In about 5 to 6 step clicks like it’s running through steps of code inside. I got to carefully look at these Cursor AI created Methods.& Functions.

There’s a couple of things to look out for that sometimes cause this behavior:

• if the method uses #pragma backgroundtasks false, step in may not work
• if the method has an attribute that makes it not debuggable(like Hidden)
• if the method first calls an internal Xojo method and then calls your method
• if the Xojo IDE injects code into your method (the profiler does this)
• if you are calling a Xojo internal method that is not properly tagged as such.

2 Likes

Those are interesting behaviours for which I don’t know much. Are they documented somewhere? (I never saw documentation about them).

They’re probably not documented because there’s nothing you can do about it… and if they’re configured correctly, you never know they’re there. It’s just an easy mistake to make, and very hard to catch with a unit test

I’m seeing this too now in Xojo 2026 under MacOS, in a place where it used to step through just fine in older Xojo versions.

It’s just a normal method call (to a method in an external module). No attributes, no C code, no pragmas.

Edit: and then when I clicked to set a breakpoint, the IDE quit without warning :confused:

Is there a case for this?

I haven’t seen this behavior yet, so I wouldn’t be able to provide a good example.

Thank You Julia - It’s doing it on my MacOS as well too. It won’t even run those Methods there. Windows it runs the method through without showing it the debugger with multiple clicks.Cursor AI creates methods with a lot of Parameters. I noticed the one that is giving me problems has 12 Parameters. I’m just go to back out of them and do them log hand. At least I know other people are experiencing it too. Also I’ll keep the #pragma backgroundtasks false in mind Thanks Greg

After relaunching Xojo after the unexpected quit, the problem no longer exhibits and stepping through the code in question works again.

1 Like

Man, I just LOVE those kinds of bugs

2 Likes