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.

P#14361 2015-09-19 12:41 ( Edited 2015-09-20 19:08)

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

P#14422 2015-09-20 13:37 ( Edited 2015-09-20 17:37)

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

P#14425 2015-09-20 13:59 ( Edited 2015-09-20 17:59)

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.

P#14428 2015-09-20 14:07 ( Edited 2015-09-20 18:07)

I see. Thank you.

P#14430 2015-09-20 15:08 ( Edited 2015-09-20 19:08)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 07:35:40 | 0.007s | Q:14