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
Hot Topic (More than 8 Replies) How to debug ESP32 code with VisualStudio+vMicro? (Read 5963 times)
Teeyacool
Newbies
*
Offline


Posts: 7
Joined: Jan 5th, 2019
How to debug ESP32 code with VisualStudio+vMicro?
Jan 7th, 2019 at 6:07am
Print Post  
Build Debug version project success,  begin debug, download OK, but F11 or F10 without any response.
Break point has set.
Is there a  step to setp guide for ESP32 debuging?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #1 - Jan 7th, 2019 at 1:14pm
Print Post  
Debug is the same for all chips. Are you using serial/usb upload or OTA?

If serial/usb then ensure the toolbar says Debug and not Release
  
Back to top
WWW  
IP Logged
 
Teeyacool
Newbies
*
Offline


Posts: 7
Joined: Jan 5th, 2019
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #2 - Jan 8th, 2019 at 1:31am
Print Post  
I'm using serial/usb upload. The attachments shows my set.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #3 - Jan 9th, 2019 at 1:58pm
Print Post  
note: If you are debugging using the upload port you do not need to configure the Debugger menu properties such as local port.

The issue might be your usb driver. That driver is confusing because the version 10 for windows universal does not work for normal windows 10 c# code which is what visual micro uses to access the port. You should ensure you have the last v6x version of that driver installed. You are not using windows universal so that is why the 10x is wrong for you.

Please test your serial connection using a new empty project with little code. When the serial works the visual micro debugger should work.

If the debugger does not work after that then let me know
  
Back to top
WWW  
IP Logged
 
Teeyacool
Newbies
*
Offline


Posts: 7
Joined: Jan 5th, 2019
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #4 - Jan 10th, 2019 at 1:44am
Print Post  
1.Using a new empty project with little code. When the serial works the visual micro debugger is work, but it's abnormal, what ever i press F11 or F10, it always shows paused at the same line.
Set two break point and restart, press the F11 or F10 just runs on this two break poin, can't execute line by line.
2.Using a long code, the visual micro debugger is not work as before.
« Last Edit: Jan 10th, 2019 at 2:00am by Teeyacool »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #5 - Jan 11th, 2019 at 5:21pm
Print Post  
Hi,

Code size does not affect the debugger. 

It is a simple debugger that does not support stepping but supports charting, performance monitor and other features. Pls see the debugger docs and the debug overview.

Please test serial.println() in your large project to see if it is working. If so at what speed? Does 115200 work?

Thanks
« Last Edit: Jan 11th, 2019 at 5:22pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Teeyacool
Newbies
*
Offline


Posts: 7
Joined: Jan 5th, 2019
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #6 - Jan 12th, 2019 at 1:19am
Print Post  
The serial println is fine.
Will the VM support JTAG debug?
The ESP32 support JTAG, https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/jtag-debugging/...
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #7 - Jan 12th, 2019 at 1:42am
Print Post  
I didn't see the loop(void) in your first example. Normally for arduino it is just loop()

If you also have a setup(void) that might cause the debug to fail to start.


Code (C++)
Select All
void setup()
{

} 




Yes jtag is coming over the next few months and will loose support for vs2012 and vs2013. vs2019 1.2+ requires some changes and it seems like the right time to be able to take advantage of never microsoft gdb technologies.
  
Back to top
WWW  
IP Logged
 
Teeyacool
Newbies
*
Offline


Posts: 7
Joined: Jan 5th, 2019
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #8 - Jan 12th, 2019 at 6:19am
Print Post  
My first code include setup() and loop().
I'm still hope the JTAG can be supported.
Thanks for your help!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint