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 Serial Debugging on ESP32 (Read 1613 times)
DJ
Newbies
*
Offline


Posts: 2
Joined: Jan 12th, 2022
Serial Debugging on ESP32
Jan 12th, 2022 at 6:52pm
Print Post  
Hi 

I am very new to both ESP32 and Visual Micro.

I am trying to get debugging to break at certain points but it seems like its not breaking at point in VS or any serial message output.

This is my code.

Code (C++)
Select All

int counter = 0;
void setup() {
Serial.begin(115200);

}

void loop() {
	Serial.println(counter);
	delay(1000);
	counter++;
	Serial.println("Hello World");

	if (counter > 10)
	{
		Serial.println("Break Point ");
		counter = 0;
	}

}
 



The break point has been added after counter > 10.

Is there any video that gives some detail on how to set this up?


The serial Windows shows

Port closed
Uploading to I/O board
Opening port
Port open

Port closed
Opening port
Port open

« Last Edit: Jan 12th, 2022 at 6:54pm by DJ »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: Serial Debugging on ESP32
Reply #1 - Jan 13th, 2022 at 10:01am
Print Post  
The best place to start with the Serial debugger is the walkthrough guide below, which shows how to enable the serial debugger, and how to set breakpoints in your sketch:
https://www.visualmicro.com/page/User-Guide.aspx?doc=Debugging-Walkthrough-Start...
https://www.visualmicro.com/page/User-Guide.aspx?doc=Debugging-Walkthrough-1.htm...

Other videos using the Serial Debugging setup are below for reference:

Debugging INO and CPP Files using the Serial Debugger: https://www.youtube.com/watch?v=ujJT4cz6MmU

Conditional Breakpoints and the Serial Debugger: https://www.youtube.com/watch?v=kSxPGl8pEY8

Calibrating Sensors using the Serial Debugger: https://www.youtube.com/watch?v=RL3T7XvHPFM

If you still have issues, please attach the full text from the output window (with verbose and show build properties enabled as shown at the top of this page), along with a screenshot of Visual Studio.



  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial Debugging on ESP32
Reply #2 - Jan 18th, 2022 at 3:50am
Print Post  
Please note that a bug in esp32 1.0.6 core prevented the debugger from working unless the serial.begin() in the user code is commented or removed. The issue is resolved in the more recent 2.0.1+ cores.
« Last Edit: Jan 18th, 2022 at 3:51am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint