I gave up with the built in debugging tools a while ago as they tend to get constantly spammed with non-essential messages making them very hard to read.
I have this in all our scripts..
-- Debug print
function DebugPrint ( str )
local t = Call( "GetSimulationTime" );
local n = string.sub (Call ( "GetRVNumber"));
SysCall ( "ScenarioManager:ShowAlertMessageExt", "Engine:" .. n .. " " .. t, str, 5, "" );
end
This produces a pop up in the top right corner that fades after 5 seconds and looks like:
Engine:1001YNNY13A 10:22:37
This is my debug message
Then I just call DebugPrint("This is my debug message") in the script as needed. I have some that are always there (Initial start up, loco reset on player take over/leave, etc) and some I throw in temporarily when I'm bug chasing.
When the engine is ready for public release I just comment out the 3 lines in the function so it's easy to put back in if needed later.