Run macro line by line in LO basic IDE?

Hi folks!

Looking for a way to run my LO Basic macro line by line for debugging puroses. I know you can do this in the MS Office IDE via “F8”. Is there similar functionality in the LO IDE?


The facilities are almost identical.
You can use F8 to step through your code,
Shift-F8 to step over,
Shift-Command=F8 to step out.

You can also set (and unset) breakpoints and Enable a watch on variables
All these are click on icons on the bar of the code creation/editing window.

And if you place your cursor on or in the SUB or FUNCTION deceleration line
and click on the RUN BASIC (green right pointing arrow head on my Mac). You can
execute the code directly.

A neat shortcut I’ve discovered after writing some new code.
Click and insert a breakpoint anywhere and you’ll get a syntax check for free.

If you are getting property not found it’s possible that you are calling a function or routine that does not exist.
However it’s also very likely that it DOES exists and at the point of failure you have mis-spelt it’s name.
I would do a search through your code for the name.

Thanks Jay! I tried F8 and it didn’t work, but my laptop has some funky function keys. Appreciate the info.

Thanks for the info. I gave it a try and I couldn’t get past the Base form and control calls. I kept getting “property or method not found”. Do you know any way around this?
Thanks in advance.

@docbda Following on from what others have said and your last comment when you get error “property or method not found”.
If you create a Macro that runs from an event, such as a button click, and you use the event argument in that Macro then you cannot run the Macro from the Basic IDE. For example –

Sub test(oEvent)
oForm = oEvent.Source.Model.Parent
End Sub

Is a quick way of obtaining the Form Object oForm. The oEvent Object is passed as an argument to the sub. The source of the event is the Button and the parent of the Button is the Form. If you run this directly from the IDE the Event does not occur so the Macro will fail.