Scirra cog

About Us

We're a London based startup that develops Construct 2, software that lets you make your own computer games!

Archives

Browse all our blog posts

Latest Blog Entries

We love brains!

Join us! Joiiinnn ussss! Mooooree brains!

Introducing the Construct 2 Debugger and Profiler

by Ashley | 2nd, October 2013

Defects are a fact of life when developing a game or app, and figuring out how to fix things can take up a significant amount of project development time. A debugger is a tool specifically designed to help with this, by clearly showing everything that is happening and allowing you to solve problems much more quickly. With the latest stable update r146, Construct 2 now includes its own debugger, enabling faster and easier development of professional-grade games and apps. This is a free update for all existing Construct 2 users.

Debugger features

The Construct 2 debugger runs in the browser, powered entirely by the same HTML5 technology that the games themselves run on. A panel appears alongside the game with lots of tools and information to help you learn more about your project.

Construct 2's debugger

The basic usage of the debugger allows you to pick an object, and browse its state while seeing the instance highlighted in the game. You can either see the values changing in real-time, or pause the game and browse through the values at your leisure.

Viewing an instance in the Construct 2 debugger

It goes a lot further than that though! Some more of its features include:

  • Being able to pop-out in to a separate window - useful for multi-monitor setups
  • Controls to pause and resume the game
  • Step the game frame-by-frame when paused
  • Save and load the entire state of the game to be able to repeatedly test a single section of the game, taking advantage of the savegames system
  • View a real-time summary of performance details
  • Browse a list of all objects in the game, and inspect information about them, including their instance variable values and behavior states
  • Edit any value at any time and see the change take effect in real-time
  • Add individual values to the 'Watch' tab, creating your own space with just the values you're interested in

And that's still not quite it - the profiler and event breakpoints let you go even further.

Profiler

Profilers are tools that show you a breakdown of how much processing time is spent in each area of your project. In the debugger you can also switch to the Profiler tab to see detailed performance information about the game, broken down right the way to how much time is being spent in individual event groups.

Construct 2's profiler

The profiler works by using high-resolution Javascript timers to measure the time spent in each area of the engine: event sheets and groups, physics simulation, draw calls (from the CPU), and other engine tasks. Note that the profiler only shows a breakdown of CPU time on the main thread; the time the GPU takes to actually finish rendering is not shown, nor are other CPU tasks happening on other threads such as processing audio (or in some cases the actual draw calls). Still, it can provide an at-a-glance summary of some areas that could potentially be performance problems, especially within your event sheets, and these are often the main problems anyway.

We have more performance advice in our Performance Tips manual entry, as well as a warning against unnecessary optimisation in our blog post Optimisation: don't waste your time. Remember, if your game already runs fast enough on all your target platforms, you don't need to optimise it! Your time will be better spent on making your project better.

Breakpoints

Perhaps the most advanced feature of the debugger is the ability to set breakpoints on events. Breakpoints cause the debugger to pause when a specific event block, condition or action is reached at runtime. They appear as a pause icon, as shown below.

A breakpoint set on an event

You can even step through the event sheet event-by-event, condition-by-condition, and action-by-action, watching the debugger values update as each part of the event runs. Construct 2 highlights the part of the event that is about to run.

An action highlighted in the debugger

This is the ultimate way to learn how your events work in detail - and perhaps even identify the single condition or action at the heart of an issue.

Unfortunately due to the architecture of the Construct 2 engine, breakpoints cannot be set anywhere inside triggers or looping events. However it may be possible to remedy this in future, and being able to step through most events can still be incredibly valuable.

Free edition limits

Users of the Free edition can start up the debugger, and use it to browse the state of games. However editing values, the 'Watch' tab, the profiler, and the ability to use breakpoints are only available with a license. Purchase a license and take advantage of these powerful new capabilities!

Find out more

You can learn more about how these features work in the manual entries on the debugger and breakpoints, which includes specifics on how to use these features from Construct 2. Learn more about Construct 2 itself in the Construct 2 section of our site, and as always, stay tuned for more updates with new exciting features still to come!

Now follow us and share this

Tags:

Comments

12
DrGreenThumbCAN 6,347 rep

Thanks so much for the continued hard work
debugger and profiler are great additions to an already stellar product

Wednesday, October 02, 2013 at 3:20:36 PM
7
TELLES0808 21.2k rep

C2 is definitively the best HTML5 tool for making games and apps ever made. It's not a point to discuss, it's the true, free for everyone who want test and comprove.

Wednesday, October 02, 2013 at 3:24:20 PM
3
jobel 13.7k rep

wow, this will beat all my manual debug text objects that I'm constantly using! awesome... thanks so much! After using the Free version for a few months, I've come to love the ease and flexibility to realize my game designs. So I'll be buying the full version later today!

Wednesday, October 02, 2013 at 3:32:17 PM
3
RandomExile 12.1k rep

I think this was probably the most requested tool I've seen for C2's development -- amazing responsiveness and brilliant work! Thanks!

Wednesday, October 02, 2013 at 3:38:43 PM
3
Kayser 2,804 rep

C2 seems more professional than ever now. Great!

Wednesday, October 02, 2013 at 3:48:07 PM
2
Dobandon 6,366 rep

This software couldn't get any better!

Wednesday, October 02, 2013 at 3:52:58 PM
6
ZachSmif 1,522 rep

Just keeps getting better and better! Why isn't everyone using this?

Wednesday, October 02, 2013 at 3:57:24 PM
5
Jase00 9,792 rep

Brilliant stuff (Y)

Wednesday, October 02, 2013 at 3:58:37 PM
3
divaweb 2,659 rep

Fantastic. Thank you!! You just keep making me feel better and better about buying the pro version :D

Wednesday, October 02, 2013 at 4:02:02 PM
2
XFulgor 1,312 rep

uff!!! Al fin!! ya era hora :)

Wednesday, October 02, 2013 at 4:02:42 PM
4
plinkie 35.7k rep

we love you scirraaaaaaaaaaaa

Wednesday, October 02, 2013 at 4:04:47 PM
3
klkitchens 2,150 rep

HOO.....RAY!!!!

Wednesday, October 02, 2013 at 4:06:15 PM
4
Danijerry 6,619 rep

This is great! It is going to save a lot of time. The best tools a developer needs. Thanks.

Wednesday, October 02, 2013 at 4:06:39 PM
6
lobopcr 959 rep

I just met this tool is easy to use and very intuitive ... CONGRATULATIONS

Wednesday, October 02, 2013 at 4:07:49 PM
5
lwgames 3,180 rep

good job! this will help a lot

Wednesday, October 02, 2013 at 4:08:28 PM

Leave a comment

Everyone is welcome to leave their thoughts! Register a new account or login.