Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Can Serial Monitor show leading spaces? (Read 2349 times)
Chris Rowland
Newbies
*
Offline


Posts: 2
Joined: May 24th, 2016
Can Serial Monitor show leading spaces?
May 24th, 2016 at 8:43am
Print Post  
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
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can Serial Monitor show leading spaces?
Reply #1 - May 24th, 2016 at 4:05pm
Print Post  
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.
« Last Edit: May 24th, 2016 at 4:06pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Chris Rowland
Newbies
*
Offline


Posts: 2
Joined: May 24th, 2016
Re: Can Serial Monitor show leading spaces?
Reply #2 - May 24th, 2016 at 7:00pm
Print Post  
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
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint