[Solved] Debug a macro line by line
[Solved] Debug a macro line by line
How do I switch on line by line debugging of a macro, so that it steps through the macro and waits after each line for a key to be pressed before moving to the next line?
Last edited by robbyn on Sun Sep 26, 2021 1:26 pm, edited 1 time in total.
Libreoffice v7.2.0.4 on Ubuntu 20.04 Locale en-GB
Re: Debug a macro line by line
Try to insert a breakpoint to every lines of your subroutine/function.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Debug a macro line by line
F5 runs the routine where the cursor is in
F7 adds the variable name under the cursor to the watch window
F8 runs in step mode in the routine where the cursor is in.
Shift+F8 runs in step mode but running through the branching routines.
F9 adds a break point to the line where the cursor is in.
F7 adds the variable name under the cursor to the watch window
F8 runs in step mode in the routine where the cursor is in.
Shift+F8 runs in step mode but running through the branching routines.
F9 adds a break point to the line where the cursor is in.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Debug a macro line by line
Thank you for explaining the step approach.
Prior to your explanations I did not understand that the cursor needed to be in the macro on screen.
Prior to your explanations I did not understand that the cursor needed to be in the macro on screen.
Libreoffice v7.2.0.4 on Ubuntu 20.04 Locale en-GB
Re: [SOLVED] Debug a macro line by line
OpenOffice always starts in the first routine of the current module.
Workaround:
Workaround:
Code: Select all
Sub TopRoutine()
TestRoutine
End Sub
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice