To debug ONLYOFFICE Builder scripts, follow the instructions below.
Use the debugger command in your script:
debugger; var oDocument = Api.GetDocument(); var oParagraph = oDocument.GetElement(0); oParagraph.AddText("Hello world!");
Press the Run button to run your script.
The debugger command works as a breakpoint and pauses the execution at the script point where this command is inserted.
Set the V8_USE_INSPECTOR environment variable to 1:
Run the Builder script with the docbuilder command:
Now you can debug the executed methods.