Page 1 of 1
Stopping Console Output
Posted: Sat Feb 11, 2023 4:49 am
by Centripidity
Does anyone know of a way to stop the console output and discard all remaining messages after a debug session has been terminated?
The problem I'm having is that, if an exception is thrown somewhere in ProcessSample(), the console gets the message for every call of ProcessSample() which means console output just keeps going on-and-on for quite a while after the debug session has been terminated.
Re: Stopping Console Output
Posted: Sat Feb 11, 2023 5:01 am
by Aarnville
I normally just quit VM Designer and start it up again. Not an elegant solution but quite a quick one.
Re: Stopping Console Output
Posted: Sat Feb 11, 2023 5:09 am
by Centripidity
Aarnville wrote: ↑Sat Feb 11, 2023 5:01 am
I normally just quit VM Designer and start it up again. Not an elegant solution but quite a quick one.
It's an option, possibly the best one.
Re: Stopping Console Output
Posted: Sat Feb 11, 2023 5:25 am
by Centripidity
Just tried this and it can be helpful.
It doesn't stop the initial flurry of message but can be useful when you're rerunning the code trying to debug exactly why the exception is being thrown. In my case the exception messages told me it was an index out of bounds error and this little snippet of code just before the array is accessed made it easy to find what was causing it.
Code: Select all
if(i < 0 || i>23)
{
LogCV();
Log("Frac: " + frac);
System.exit(i);
}
Re: Stopping Console Output
Posted: Sat Feb 11, 2023 5:30 am
by Aarnville
Of course, if you can shut it out of your mind (I can't...) you can just continue editing the code and fixing the cause of the exception whilst the logging window continues to go crazy. You can even compile the code although seeing the result of the compilation can be a bit challenging.