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 Classic Chat / How to use the debugger?

Author
Message
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Jul 2015 15:32
Hey,

I haven't got around to using the debugger yet. I'm lucky enough not to have needed it until now. But now I really need it and I can't find any info on how to use it.
I know Paul wrote a 'how to' guide for it because I remember seeing it but I can't find it now. Perhaps it's (very well) hidden in the development blog? It doesn't appear to have it's own thread nor does it appear in the documentation.

So, Does anyone have a good link to where I can find a guide?

Thanks

AGK V2 user - Tier 1 (mostly)
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Jul 2015 15:57
Not sure where the guide is, but it's very straight forward. Works like VS Studio at the most simplistic level.

Add breakpoints with Debug | Toggle Breakpoint
Hit Debug to start debugger
Add variables to watch in Debug Variables panel
F10 to step through code
If you want to debug on a remote device, put the IP address in the Build | Build Options... window.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 5th Jul 2015 16:33
you an see this video by the game creators about use Debugger:

https://www.youtube.com/watch?v=fs3ETyppBaw
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Jul 2015 18:21
Maybe I'm doing something stupid then because I can't get it to work.
I can add breakpoints and I can add variables to the watchlist.
When I run the debugger, the code stops at the breakpoint but nothing is displayed in the watchlist and F10 does not progress the code. It remains frozen at the breakpoint.

AGK V2 user - Tier 1 (mostly)
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 9th Jul 2015 19:21
Are you debugging from Windows, Mac, or Linux, and are you debugging on a device or the local machine? The fact that the debugger pauses on the breakpoint suggests there is communication between the app and the IDE, so I can't think of anything that what would cause the communication to stop after pausing. Does the Log(String) command output anything to the Debug Log window?
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 9th Jul 2015 19:26
Hi,
Thanks for replying.

I'm on Windows and I'm running locally (2.0.14b)
Log(string) does post to the debug window but I don't seem to get any other functionality of the debugger.

AGK V2 user - Tier 1 (mostly)
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 9th Jul 2015 19:48
If you don't set any breakpoints and instead use the menu option Debug->Pause when your app is running, do you get the same problem of no variables and no further debugger functionality? Does the Call Stack window also remain blank? How about if you set a breakpoint inside a function?
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 9th Jul 2015 20:04
Sorry Paul, I'm an idiot!

I have the latest version on my PC but I've been using my laptop for the last couple of weeks and it only has 2.0.13 on it.

I'm downloading the update now - I'm sure the debugger will be fine .... oops!

AGK V2 user - Tier 1 (mostly)
JHA
20
Years of Service
User Offline
Joined: 30th Dec 2003
Location: Massachusetts, USA
Posted: 17th Jul 2015 17:06
Not sure if this might have been part of the issue too, but you have to make sure that the IDE has focus, when using the F10 and F9 keys.

If the focus is on your app, then the Debugger will appear to be frozen.

So, when the breakpoint stops the program, click on the IDE to give it focus and then you should be able to step through the code.

Proverbs Challenge: http://pc.potentialsunleashed.com/

Using AppGameKit V2 Tier 1 - FPSC Reloaded / Game Guru

Login to post a reply

Server time is: 2024-11-25 21:28:13
Your offset time is: 2024-11-25 21:28:13