Is it possible to write an RM debugger

What I imagine is a special "debug mode" for RM.


When you run the game, everything behaves as normal, except all "relevant" code requires you to perform the usual step in, step over, or step out key presses.


The console would constantly be cleared and updated to display variables.


You can "monitor" certain variables (kind of like ruby's global variable monitor)


You can insert breakpoints by typing in some sort of special method call.
You could do the monitor by writing your own console app (C++/C#/Ruby) and have Ruby send it data all the time. Afaik there is no other way w/o breaking the eula. It probably supports a clear() method but it's not available to us.

I don't know about the other questions. Step in, Step over, etc. will probably never be available in RPG Maker. RPG Maker is more oriented towards non-programmers imo. That's probably why we have no decent/modern debugging tools and lots of libraries stripped out.
I managed to set up my console window to display switch/variable changes while I play, helps me when i'm trying to test out my stuff.

class Game_Switches def []=(switch_id, value) @data[switch_id] = value on_change p sprintf('Switch %d: %s', switch_id, value) # output to console endendclass Game_Variables def []=(variable_id, value) @data[variable_id] = value on_change p sprintf('Variable %d: %s', variable_id, value) # output to console endendYou can technically do this for many things.
kerbonklin's method gives me an idea.

I'll probably have some sort of very stripped down debugger available after looking into some more meta-programming things

Thanks!

Also, clearing console is easy:

Code:
system("cls")
Oh I never knew that... Then monitoring variables using the console is easy. Like kerbonklin posted 🙂 . Looking forward to your debugger (if it will be available that is).
https://github.com/Hime-Works/Requests/issues/19

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-write-an-rm-debugger.19682/