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 / Simulating ASSERT in Studio?

Author
Message
rev_ken
2
Years of Service
User Offline
Joined: 16th Apr 2022
Location:
Posted: 20th Apr 2022 12:17
I'm an old school C++ dev really digging AppGameKit Studio. I'd prefer to stay in the studio IDE at this point.

However, I'm really, really missing the ability to add ASSERT's into the code. I've tried to simulate this a little bit with logging, but I would like to create debug breakpoints when I violate an assumption.

Is there any way to get something close to this behavior in Studio? Sorry if this is an obvious question, but I've searched and haven't found anything yet.
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 20th Apr 2022 13:22
No., I mean we can't even create a breakpoint programmatically.
What you could do is have an IF Statement for an expected value, with a Log( "myError" ) that you manually add a breakpoint to.
That should work functionally similar in Step-Through Debugging; as the breakpoint will be ignored if the line isn't run.
Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 20th Apr 2022 13:55 Edited at: 20th Apr 2022 14:04
One method i've used (a lot) in the past with various BASIC's is hiding my custom commands inside rem blocks. This means the program with run as normal during a normal compile & run.. But if there's drama's you pass the source through your building program that will perform whatever actions i'm wanting to insert/replace. You don't have to parse the code at all; just search for your token(s) of choice and replace or remove them.


To give you the idea.. a common one I've used a lot is a variation of a remove block . Of course you can do the same with alternative versions etc but you gets the idea



PlayBASIC To HTML5/WEB - Convert PlayBASIC To Machine Code

Login to post a reply

Server time is: 2024-04-19 08:58:06
Your offset time is: 2024-04-19 08:58:06