Disclaimer: This guide was originally written by Andy Reitberger. It has been published here with his consent. If yo want to access the original article you can do it clicking here.

If you are using the Cocoon Plugins in your Construct 2 project  the “Preview in your Browser” feature does not work anymore as they are mobile platforms only plugins so to test and debug your application you need to use a Cocoon Developer App.

You can create a developer app for each project at cocoon.io.

New Cocoon DevApp

Click on “Compile Developer App”. This may take a while. Once the app is ready you can download it clicking on the compilation download icon. Notice that when it’s a Developer App compilation the icon has a wrench small icon in the top right corner.

cio_developer_app_download

You will also get a notification via mail. Then you can download the Developer App directly to your phone and install it (most devices are working with the ARM version).

How to debug your game

Important: Before you are doing following steps make sure that you have installed the Developer App on your device.

Open your project you want to debug with Construct 2 and export it to Cordova. Open the folder where you exported the files.

  • Delete: intelxdk.config.additions.xml
  • Delete: config.xml

The plugin information are already included in the Developer App, so you don’t need those two files above.

Fix c2runtime.js

Important: This issue should be fixed in the latest beta version of Construct 2 (r211) or higher.

Due a bug we also need to adjust the c2runtime.js file. You’ll find more information here.

  1. Open the ‘c2runtime.js’ file with an editor of your choice
  2. Search for the following line:

and replace it with this one:

Then save the file.

Zip the files

If you have performed all steps above you can zip the content and upload it to your test device (where the developer app is installed).

cio_prepare_debug_zip_files

Alternatively you also can upload the zip file to a web server and load it via an URL.

cio_developer_app_url-188x300

Then choose the engine you want to use. We recommend Canvas+ due it’s awesome performance.

cio_developer_app_debug-188x300

In the upper left corner you can check the current performance (FPS, frames per second).

Now you’re able to debug your app without compiling it. This makes the whole process much easier than compiling each changes.

cio_developer_app_debug_console-188x300

cio_developer_app_debug_actions-188x300

The Developer App comes along with a debug console. There you can see the log (Warnings & Errors).