Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / [SOLVED] Game compiles OK but fails in debugging mode

Author
Message
Ron2019
4
Years of Service
User Offline
Joined: 27th Jul 2019
Location:
Posted: 24th Feb 2020 21:33 Edited at: 24th Feb 2020 22:26
I am suddenly unable to run my game in debug mode. The Message tab says it compiles and F5 runs as expected, but when I start it in debugger mode the AppGameKit Player screen appears for 2-3 seconds and then closes without warning or error and I am returned to the IDE. My game screen never appears. A break point at the very top of the MAIN module is not hit, suggesting the problem is occurring before it even gets to Main. I AM able to debug a newly created project, which suggests something is wrong with my code, but commenting out my latest code changes doesn't help. Restarting the IDE also hasn't helped. I'm trying removing all of the code files except MAIN to isolate the issue, if I can, but that is going to take a while. And I really do not want to have to rebuild this thing from scratch since there seems to be no way to copy designer elements between scenes, much less between projects.

Has anybody ever had this problem? Can anybody suggest how to fix it?

The author of this post has marked a post as an answer.

Go to answer

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 24th Feb 2020 21:50
Try deleting these two folders and then run it again;
C:\Users\{your_id}\AppData\Local\AGKApps\Windows\{yourapp}
and
C:\Users\{your_id}\AppData\Local\AGKApps\{yourapp}
Ron2019
4
Years of Service
User Offline
Joined: 27th Jul 2019
Location:
Posted: 24th Feb 2020 22:50 Edited at: 24th Feb 2020 22:51
This post has been marked by the post author as the answer.
Thanks for your response, blinkOK!

I've figured out what caused this and thought it worth mentioning because I had to compare the AppGameKit files of the broken and working versions to find the cause. The broken Project.AGK file contained this line:

watch_variable=[g_intValidMoves.Length;

Note the unbalanced opening square bracket? AppGameKit added this line to the project file when I asked to check the value of "[g_intValidMoves.Length", fat-fingering the bracket while typing, and then closed the project. AppGameKit won't let us check properties in the debugger anyway, but made no mention of square bracket being an invalid character in the watch list and undoubtedly saved it to the project file for my "convenience" the next time I opened the project. Mea culpa...but the interface ought to warn and/or refuse to save invalid characters in the project file.

Login to post a reply

Server time is: 2024-03-29 07:48:40
Your offset time is: 2024-03-29 07:48:40