Helpful advice when debugging your game!

ace999

  • Posts: 20
The following advice will make the process of debugging much less TEDIOUS!

First, Go to "Settings" then choose the "Controls" tab.  Add a new control and name it "debug_key" (you can really name it anything but that's what I called mine.  Under the "Key" section enter the "~" key, which stencyl will display as "Back Quote".  Then click "OK" to save it.

Next, go the Scene that you wish to debug, after you open the scene, move over to the "Events" tab and add a new Event, "Basics -> When Creating".

And finally for the last and final step, add the following code to your "When created block":
>> enable debug drawing using color [select a bright color]
>> simulate key [press] using [debug_key]

And that's it!  Now every time you run your game, it will automatically show the collision bounds of all your actors AND it will automatically start the debug Console so you don't have to keep pressing it every time.

Unless you are some godlike programmer, you will be debugging ALLOT! So I hope this helps you save some time.  Let me know if you have any questions. 

I guess I could add pictures or a youtube video if anyone doesn't get it.

Good luck!




leechiang

  • Posts: 21
Hey @Ace999,
Thanks for sharing that. Nice work.