Log In  


It would stop execution and dump you into command mode. This would work like setting up breakpoint when you know that something doesn't go right after a specific instruction is executed but you are not sure what.

Example uses:

Stop() after changing the variable: Allows you to print it out in command mode to see if value change according to expectations (e.g. when dealing with imprecision of decimals or when you suspect integer overflow)

Stop() at the end of _Draw(): Allows you to display cart frame by frame e.g. when you debug graphics effects like particles that doesn't seem right.

And so on.

Of course after stopping cart you can then resume() it ;).

And before you ask, yes I know you can stop execution with ESC, but sometimes you need to stop it at the very precise moment which is hard to do manually and so something like stop() would be useful.



stop() method is already implemented,I use it all the time when debugging...


It is? Certainly it isn't in the manual or in syntax highlight.


Not in manual but quite intuitive to find. You can then type resume into command line to resume, but be aware that if you stop your program in the middle of a function, rest of it will never be actually processed and program will continue by calling _update and _draw functions.


I see. Thank you.



[Please log in to post a comment]