Here is the super useful developer debug console for all GameMaker projects!
The default buttons to open and close it are ` and F1 but you can add and remove the controls you want.
This developer console allows you to quickly edit and debug your game while it is running. It is packed with features like the ability to create and destroy objects, turn debugging tools on and off, view and edit variables and many other things.
I can never remember what I have called my variables and objects so it auto completes everything from scripts and rooms to objects and variables.
It’s been made easy to add to your GameMaker games, you just add obj_console and font_console into your project from the GameMaker Marketplace and create the console when your game starts. You don’t need to edit any of the console it will automatically scan the project and add everything.
Add this to your projects to allow you to easily debug things while you have your game open without needing to edit any code.
While your game is running you can press a button to open the Developer Console. Simply type in these commands to either create or destroy objects live while your game is open.
destroy obj_enemy
Instantly create graphs of any object value. This automatically determines if it needs to graph an int, display a string or look at a whole array. You can easily update these values as well.
edit obj_player.jump_height 20 //change the players jump height
Easily customise the colours, sizes, animation speed etc.
Auto complete variables, object names, room names, scripts as you type commands in.
It keeps a history of past commands across sessions so it is really easy to get to common commands.
Just add the one object and one font into your project (which can be found on the market place) and run this code when your game starts:
The console can be opened with the F1 key (this can be changed and multiple keys can be added to open/close the console)
Full support for mouse controls and copy and pasting.
Change game speed. Often its helpful to slow down the game to make sure animations are frame perfect or speed up the game so you don't have to wait.
Room goto. Easily jump to rooms to help you test different levels and screens so you don't need to...
Very light weight. While closed it has almost zero impact on performance, and even when open...
Highly customisable, change the keys to open and close it, change animation speeds, change borders and sizes, change the font size.
Turn on debugging tools...
Multiple ways to input
set obj_player hp 100
set(obj_player,hp,100)
set obj_player.hp 100
set.obj_player.hp 100
set,obj_player(hp,100)
Has all the textbox functionality you expect like being able to copy and paste, use Shift + Arrow Keys to select, Ctrl + Backspace to delete whole words, mouse controls. And many minor things.
And many other features like toggling full screen and creating debug events so you can track them in the debugger.
set [obj] [variable] //Change the value of a variable: set obj_player hp 100
destroy [obj] //Destroy an object: destroy obj_enemy
view [obj] [variable] //Display a graph of a value: view obj_enemy x
script [script] [optional variable] [optional variable…] //Run one of your scripts: script set_volume 100
game restart //restart the whole game
game fullscreen_toggle //Switch the game between full screen and windowed
game resource_count //Displays a count of how many resources are currently active in the game (surfaces, datasets, particles, buffers, paths etc)
game instance_count //Shows how many instances of each object there is.
game room_restart //Restart the current room.
game room_goto [room] //Loads the room that is passed in.
game debug_overlay [true/false] //Turn on/off the built in GameMaker fps overlay.
game texture_debug [true/false] //Turn on/off the built in GameMaker texture information.
game set_speed [fps] //Change the speed the game is running at (in fps).
game debug_event [string] //Post a message in the debug console.
console clear_screen //Remove any messages in the history window.
console delete_history //Delete the save file.
console version //Display the version of the console you are currently running.
console check_for_updates //Load a web page that shows if you are on the latest version and what features I am working on.
console about //Just to remind you that I am a human.
help //List the most popular commands you can run.