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
Leading spaces are supressed in serial monitor (Read 630 times)
Joao tavares
Newbies
*
Offline



Posts: 9
Leading spaces are supressed in serial monitor
May 24th, 2018 at 3:42pm
 
In my Visual micro Version 1.1803.26 the leading spaces sent to the serial windows are suppressed what causes a lot of stress for someone trying to develop something without too much experience. I thought that I was doing something wrong. I tried with a different serial monitor and things are correct with the leading spaces
What is happening ? Why are not others speaking about this only something in 2013.
Best regards

Joao
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Leading spaces are supressed in serial monitor
Reply #1 - May 24th, 2018 at 3:51pm
 
Hi,

This only happens when in debug mode. If you switch the toolbar from Debug to Release and then upload you will see the spaces are not removed.

You can find a forum thread where it was discussed here

Thanks
Back to top
 
WWW  
IP Logged
 
Lookingooder
Newbies
*
Offline



Posts: 2
Re: Leading spaces are supressed in serial monitor
Reply #2 - Aug 22nd, 2019 at 3:20pm
 
Thank you for reply.

Here is short test code:
Code (C++):
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>

const char* myssid = "AP MODE";				//SSID AP MODE
const char* mypassword = "12345678"; //Password AP MODE


char output_buffer[5000] = "\
<!DOCTYPE html>\
<html>\
 <head>\
  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\
  <title>Main page</title>\
 </head>\
 <body>\
			What is Visual Micro?\
																																													\
			Visual Micro is an so called extension for Microsoft Visual Studio 2017 and 2019 and\
			for Atmel Studio 7 that allows any Arduino project to be developed, compiled, and\
			then uploaded to any Arduino board, while taking benefit of the powerful features of Visual Studio and Atmel Studio.\
																																																\
			Visual Micro is fully compatible with the Arduino development environment and uses\
			the same libraries, source code, and development tools. The difference lies\
			in Visual Micro's user interface which provides an advanced and professional\
			development environment, and allows for more advanced development than the existing Arduino IDE.\
																																																				\
			What does the term IDE mean?\
																																																					\
			In this documentation, you will often find the term \"IDE\". This is an industry\
			standard term meaning  Integrated Development Environment, which is a software\
			application that incorporates a source code editor, build tools such as a compiler\
			and a debugging system. The IDE is used to write, edit, build, and test your software.\
			Whilst Arduino's IDE provides a basic starter level IDE, Visual Micro in conjunction\
			with Microsoft Visual Studio or Atmel Studio provides an enhanced and more functional IDE.\
	</body>\
</html>\
";

WiFiServer server(80);
ESP8266WebServer serverAP(80);

void handleRoot()
{
// serverAP.send(200, "text/html", "<h1>Connected</h1>");
	serverAP.send(200, "text/html", output_buffer);
}

void setup()
{
	Serial.begin(115200);
	Serial.println(output_buffer);
	Serial.println("\n=========================");

 WiFi.mode(WIFI_AP);

 //AP
 IPAddress myIP =WiFi.softAP(myssid, mypassword);
 serverAP.on("/", handleRoot);

 serverAP.begin();

}//setup()

void loop()
{
 serverAP.handleClient();
 delay(100);
}//loop()

/*
*/ 



and outputs sent to E-mail
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Leading spaces are supressed in serial monitor
Reply #3 - Aug 22nd, 2019 at 3:25pm
 
Does the problem happen when to switch the tool bar to Release mode?
Back to top
 
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Leading spaces are supressed in serial monitor
Reply #4 - Aug 27th, 2019 at 3:28pm
 
I have tested this and the trimming of white space only happens in Debug Mode. A Release compile shows all text including whitespace.

Maybe this was a bug in the older vs2013 version of visual micro. Did you try vs2017 o 2019?

Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print