Debugging in loops

Discussion and feedback on Construct 2

Post » Tue Oct 04, 2016 4:06 pm

There are a lot of things that I love about Construct2. The editor has the best blend of graphical scripting / programming concept representations that I've seen so far. But there is also a deal breaker for me. Not being able to use the debugger inside of loops makes certain types of development tasks very difficult for me. I wanted to know if this is going to change in the future? Will Construct 2 or 3 ever fix this? Besides logging, is there any other method that I would want to use to get around this limitation?
B
18
S
6
G
2
Posts: 19
Reputation: 1,808

Post » Tue Oct 04, 2016 4:57 pm

I add a list object.
Then 'Add item' for the things that i want to examine.

I have seen others use 'log' in the browser object.
B
33
S
18
G
27
Posts: 2,442
Reputation: 20,348

Post » Tue Oct 04, 2016 5:02 pm

The problem is similar to debugging triggers, and I recently explained why that is hard: https://www.scirra.com/forum/debug-idea-request_p1071997?#p1071997

Basically the architecture of browsers makes this pretty difficult.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,240

Post » Sat Oct 15, 2016 9:34 pm

I don't know very much about how this works, but it seems that the debugger in the web dev f12 tools is able to show values inside of for loops. I think I read that this is just a web app in chrome. To me this seems to mean, nothing more than html, CSS and Javascript (which is probably an oversimplification). I wonder how the browser developer's are accomplishing this?
B
18
S
6
G
2
Posts: 19
Reputation: 1,808

Post » Sun Oct 16, 2016 6:39 am

I use browser object log functionality.
It gets me the values in the loop through the console without much hassle.
F12 open up the console easily and instantly. This functionality can be removed instantly for export by inserting a blank event for the specific keyboard keypress.

If you want to put more effort to it, there's nothing stopping you for creating a dictionary for only debugging and adding its value in your problematic areas and loop.
Then simply allow a large size text/spritefont object inside the game to keep appending any results from the dictionary values you get inside the game.
B
36
S
18
G
11
Posts: 248
Reputation: 8,694


Return to Construct 2 General

Who is online

Users browsing this forum: Cliffu and 8 guests