debug?

Get help using Construct 2

Post » Sat Aug 18, 2012 11:05 pm

In a normal programming language, I could either:
1) put print statements in key places to see if they are being called.
2) step through with a debugger.

How does one do debugging in construct 2? E.g. is there a way I can add a print statement to output to a console as an action? Or some preference to log every event?

E.g. To see which events are being triggered, or to know what the instance variables are.

I guess I could reserver a space in the game gui for debug comments, and use set text on that, but this is pretty invasive.

Any ideas?
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Sun Aug 19, 2012 12:07 am

There's a plugin that lets you print to the console:
http://www.scirra.com/forum/log-text-objects-to-chrome-console_topic47859.html

I haven't tried it myself, I generally just use text objects.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Sun Aug 19, 2012 12:23 am

I usually simply use either a text or a textbox (type textarea) object and put some "set text to" action where you would put print() with other languages.
I used to use the debug panel plugin from rex, but I often forget to delete it before export and as it opens another browser window, I often lose it behind my window so it's a pain. That's why I don't use it too much now.
Maybe @Ashley could add the ability to prevent some plugin from being exported as a plugin setting or an object property.

Anyway, at some point I'd like to have a real debugger which displays any object values (no need to add tones of actions).
Maybe a chrome and firefox plugin could do the trick.Yann2012-08-19 00:25:15
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sun Aug 19, 2012 11:02 am

Excellent info, thanks!

I'll try both options

+100 credits to ramones & Yann.

Cube maze is cool - the voiceovers are excellent too.
B
15
S
5
G
2
Posts: 357
Reputation: 3,691


Return to How do I....?

Who is online

Users browsing this forum: Colludium and 27 guests