Is there any way to cause LibreOffice to break to the debugger in the IDE? I have a macro that occasionally fails with an invalid data type in one of the arguments, but I have no idea how that happens. When the macro fails the run-time context is gone, so I have no way of inspecting the arguments or call stack. If there were something I could call (or statement I could perform), I could temporarily add an On Error
statement to trap errors and break to the debugger, and find out how to reproduce the error.
I am using LibreOffice Basic, but if it can be done with a different macro language that would be worth knowing too. Ideally the IDE would open even if it were not currently active, but a solution that only works if is already active would be better than nothing.
I do not think there is any point sharing my code, as the problem occurs quite deep while executing a macro in a large codebase and I have not isolated a situation that triggers it. Moreover I want a solution that will help me in the future, not just for this one problem.