Stopping Console Output

Post Reply
Centripidity
Posts: 140
Joined: Sun Jan 22, 2023 5:18 am
Location: Melbourne
Contact:

Stopping Console Output

Post 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.
User avatar
Aarnville
Posts: 43
Joined: Sat Jun 18, 2022 5:14 pm

Re: Stopping Console Output

Post by Aarnville »

I normally just quit VM Designer and start it up again. Not an elegant solution but quite a quick one.
Centripidity
Posts: 140
Joined: Sun Jan 22, 2023 5:18 am
Location: Melbourne
Contact:

Re: Stopping Console Output

Post 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.
Centripidity
Posts: 140
Joined: Sun Jan 22, 2023 5:18 am
Location: Melbourne
Contact:

Re: Stopping Console Output

Post 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);
      }
User avatar
Aarnville
Posts: 43
Joined: Sat Jun 18, 2022 5:14 pm

Re: Stopping Console Output

Post 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. :D
Post Reply

Return to “Module Designer”