How do I check the local variable in debugger preview?

Just started using Construct 2? Post your questions here

Post » Mon Dec 29, 2014 9:28 am

Like the title says.
B
17
S
4
G
1
Posts: 203
Reputation: 1,583

Post » Mon Dec 29, 2014 10:37 am

click on the left menu on the instance you want to the know the variable and than it opens up something like a file menu, there you choose (0) or if you have more instances there are more numbers. After clicking there you can find the variable on the right side
Read this:
yeah, i really like to say that you should "Read this:"
B
14
S
7
Posts: 138
Reputation: 1,740

Post » Mon Dec 29, 2014 12:35 pm

i want to know local variable(a smaller version of global variable),not instance variable
B
17
S
4
G
1
Posts: 203
Reputation: 1,583

Post » Tue Dec 30, 2014 9:52 pm

In the debugger menu, click on an object on your left side in the inspector, then on your right it should show all details of the given object.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Tue Dec 30, 2014 10:14 pm

@StormHo AFAIK you can't see local variables in the debugger. You'll need to print them to a text object or Chrome console, etc.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Tue Dec 30, 2014 10:24 pm

@codah wrote:StormHo AFAIK you can't see local variables in the debugger. You'll need to print them to a text object or Chrome console, etc.



:oops:

Your right there, I mistaken the local variable for instance variable -,-
I generally use my locals on the objects.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Tue Dec 30, 2014 11:17 pm

lennaert wrote:
@codah wrote:StormHo AFAIK you can't see local variables in the debugger. You'll need to print them to a text object or Chrome console, etc.



:oops:

Your right there, I mistaken the local variable for instance variable -,-
I generally use my locals on the objects.


Easy mistake to make :D I actually quite like using locals (when an instance var is not necessary). I often have a top-level Group in every event sheet and put locals for that event sheet under it (either static or not, as appropriate). A kind of encapsulation so the global variable space doesn't get too crowded :)
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Dec 31, 2014 1:08 am

In several of my creations I used global objects with various instance variables for global values :)

The thought behind it was to protect the variable content at run time.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Wed Dec 31, 2014 8:04 am

codah wrote:@StormHo AFAIK you can't see local variables in the debugger. You'll need to print them to a text object or Chrome console, etc.

Alright,thx for the information
B
17
S
4
G
1
Posts: 203
Reputation: 1,583

Post » Sat Jan 03, 2015 11:51 pm

Just wanted to correct myself, in that 'static' local variables are indeed visible in the debugger, under System.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests