Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Can Serial Monitor show leading spaces? (Read 1705 times)
Chris Rowland
Newbies
*
Offline



Posts: 2
Can Serial Monitor show leading spaces?
May 24th, 2016 at 9: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
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10559
United Kingdom
Re: Can Serial Monitor show leading spaces?
Reply #1 - May 24th, 2016 at 5: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.
Back to top
« Last Edit: May 24th, 2016 at 5:06pm by Visual Micro »  
WWW  
IP Logged
 
Chris Rowland
Newbies
*
Offline



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