You could try this -- it says it's a "console" command, but seems to be part of the script debugger/editor.
It might work in game as well since it's a console type command.
https://docs.larian.game/Scripting#ScriptLog

It sounds like you are ONLY testing "in-game" and not using "game mode" within the editor.
Is there some reason you AREN'T using the Editor + Script Editor?