VS Arduino
Visual Micro >> General Board >> Can Serial Monitor show leading spaces?
https://www.visualmicro.com/forums/YaBB.pl?num=1464079392

Message started by Chris Rowland on May 24th, 2016 at 8:43am

Title: Can Serial Monitor show leading spaces?
Post by Chris Rowland on May 24th, 2016 at 8:43am
Hi,
The serial monitor in Visual Micro - non Pro - doesn't seem to show leading spaces.
A line such as Serial.print("    abcd");
will print "abcd".

This caused me a moderate amount of grief because I was trying to develop a number to string function that would print a space for positive numbers and a '-' for negative. I couldn't work out what had happened to the space character.

The Arduino serial monitor shows the spaces.

Is there something I've missed in the set up of the serial monitor?

Sorry if this is covered, I had a look but couldn't see anything.

Regards,

Chris

Title: Re: Can Serial Monitor show leading spaces?
Post by Visual Micro on May 24th, 2016 at 4:05pm
Thanks for the post. Tha looks like a bug when debugging.

If you cange the configuration to "Release" using the tool bar then upload again you should find that leading spaces are supported in the monitor.

I will add a task to fix when the monitor knows it is in debug mode.

Alternatively if you want your own serial and debug. If there is a spare serial port on the hardware then the debugger can use a different port or if not a couple of digital pins with an ftdi adapter.

Title: Re: Can Serial Monitor show leading spaces?
Post by Chris Rowland on May 24th, 2016 at 7:00pm
Thanks for the feedback.

I've tried to reproduce this and can't.  I get the leading spaces now, regardless of being in debug or release mode.

Chris

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.