Debug Console Utilization

I sorely lack experience and knowledge in the debug console aspect of RMVXAce. Today I found myself unable to locate the error in my eventing -that would cause the game to freeze- and I started wandering why would my debug console only display true/false massages.

How can I use my Debug Console for, well, debugging?

Is there a way to make it show me the processing on an event (or all), so I can pinpoint my error?
You can use

p <any text or object>to write to console. You can use this to find out which parts of your scripts are still executed, before the error occurs.
The debug console is mainly for script debugging - theoretically you can put in a script command into an event to put something out there, but it would be easier to use the show text command instead of using a script command to print to the console.

An event can only freeze the game when you have created a loop on an autorun (or extremely lag by looping parallel processes) (always assuming that the event doesn't contain script calls - script calls can freeze the game in a lot of other ways, that's why the debug console is needed for their debugging, but then again you wouldn't be in eventing anymore if that's the case)

The fastest way to solve eventing problems is to show us screenshot of your events, then we can tell you what part of the event may cause a loop to freeze the game. Complete screenshots, not only the content area - the causes for freezing are dependent on the event settings and pages, not only its commands
I print to the console to debug events all the time. Especially if it's a parallel process or something that's going to print repeatedly, or I just don't want the flow to be interrupted to show me something. And sometimes I want to see more than what Show Text would let me see (like positions of things, without having to go through and do 2 variable assignments).


If your game is freezing, chances are debugging to the console will not tell you what's doing it.


When it freezes, are you able to move? Are you able to turn? Are you able to access the menu? The cause of the freeze can be narrowed down by considering those things.
I actually found my errors, but I'm still keeping the topic to find a a script that can print what I want in the console. The issue was a simple loop lock in a common event, where I forgot to have a "wait: 1 frame" command.
You should be more clear about what exactly you want. For printing to the console, you simply use "p". You could write a simple logger module that defines log levels like :debug, :info, :error, but you would need to write the log entries yourself depending on the active loglevel selected. Also, for error logging, you would need to wrap the corresponding parts in rescue blocks.

Also, be warned that excessive writing to the console costs a lot of performance.

Original thread: https://forums.rpgmakerweb.com/threads/debug-console-utilization.39322/