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 / Is there some way to force a Sync while debugging and paused on a breakpoint?

Author
Message
Ron2019
4
Years of Service
User Offline
Joined: 27th Jul 2019
Location:
Posted: 14th Jan 2020 00:58
I'm trying to avoid repeatedly:
1. Stopping execution to...
2. Add a Sync() statement after the line I'm trying to see the results of in the scene...
3. Restarting in debug mode...
4. Then repeating whatever steps are necessary to get to the Sync...
5. Only to discover the problem appears to be in yet some later line and having to start the process all over again.

I can't seem to find a button on the IDE to do this. Will some function key do what I need? Is this really not possible?
Ron2019
4
Years of Service
User Offline
Joined: 27th Jul 2019
Location:
Posted: 20th Jan 2020 18:32
After 69 views and not one response, such a feature apparently doesn't exist? I'd think this would be helpful for most developers.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 21st Jan 2020 21:16
Yeah honestly, I think a debugger should have a sync() at every step you go through and pause to. So definitely would be a good suggestion to have an option for the debugger to 'pretend' this is the case!
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 29th Apr 2020 00:48
If it was added it would have to be an option that could be switched on and off
otherwise all those people who use the rendering commands a pain

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 29th Apr 2020 01:13
Quote: "Is there some way to force a Sync while debugging and paused on a breakpoint?"


Sure, put the Breakpoint into an ThrowError Function that as part of it's program is to Synchronise (I'm assuming you mean Update > Render > Swap to Display the "Current State") before calling the actual Breakpoint.
The reason you'd have other Breakpoints is to Analyse the content of the current In-Flight Variables to ensure they're populating correctly.

If they're not, then you KNOW because you're breaking at or by the result of the intended Variable; where the Problem is (or at least is going to be limited to).
Note that the onus here is on YOU to place intelligent breakpoints to track the data you need to in order to Debug, and as noted... if the point is just to ensure the Output is correct, you can just use a Function that includes a Generic Breakpoint.

You can also think about breaking down Sync( ) to it's Component Elements (Update, Render, Draw and Swap)
Remember that "Render" is the Generic Function for running through Rendering all 3D and 2D "Visible" Objects... where-as calling DrawObject / DrawSprite / etc. will specifically Draw that element; which I'd argue is actually a better approach if you want more control, as you're specifically saying what needs to be Drawn and When.
Calling "Swap()" without ever calling Render but calling Draw on each element you want / need to; means only those will actually be presented to the Display Output; as what Swap does is Clear the Front Buffer, Swaps the Back and Front Buffer, then calls the Display Present (which then Presents the Front Buffer to the Display); while you're free to work with the Back Buffer.

A lot of this is about how complex and involved you WANT to be in regards to the pipeline., but it can all provide a lot of control and power.
haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 29th Apr 2020 07:53
is ThrowError available at Tier 1? can you explain? sorry i did not understand ... is there a "Try" like in java here on AGKS tier 1?
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 29th Apr 2020 09:11
Well, no... there is no "Try" Operator., but keep in mind that all it really does is automate testing and debugging.
A main reason C++ saw Try...Catch implemented was because we're talking about applications dramatically expanding in codebase scope.

Not just in terms of your own projects expanding to Millions Code Lines, but also greater reliance on 3rd Party Libraries.
This makes Garbage and Error Collection not to mention Debugging quite difficult., esp. if everyone is using DIFFERENT approaches to it.
Thus these operators helped to Standardise it.

Given the size of the Avg. AppGameKit Codebase (trust me you don't WANT to have upward of a Million Lines of Code) and that you're realistically more or less working Solo on a Project, rather than as part of a Team.
Then crafting your own Debug elements (such-as a Try...Catch Backend for Debugging) is going to remain quite simplistic.
It just depends on how you personally want to go about it.

Keep in mind these are just glorified IF NOT( ) THEN CASE...SELECT Automation.
haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 29th Apr 2020 10:18
yeah i get it, wish tough there would be try and catch for Basic in AGKS. it would really make things easier. I really liked it in Java when i was working in Android Studio. it could be a game changer for AGKS. for the "ease" of coding. for example:
i use the Particle Editor to increase the effects in my app, for now this cannot be exported to HTML5 so the entire app crashes but if i could simply try and catch without having to worry about it for that "Plugin" or "Library" then Html would work right out of the box just with out some particles which for example for my current app would be great even if just for testing with clients to see what they need rather then to upload a beta version for Google play or just creating an APK and explain everyone how they disable outsource APKS...
haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 29th Apr 2020 10:20
Actually now i am starting to think more and more about HTML5, this should actually be the testing ground for our apps, Raising a website and adding there tests for clients so you'll get their "desires and needs" and only after uploading to market.
Much simpler then testing on the market or outside of it regarding to IPA or APK or even EXE

Login to post a reply

Server time is: 2024-03-28 10:07:29
Your offset time is: 2024-03-28 10:07:29