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
How to debug ESP32 code with VisualStudio+vMicro? (Read 1268 times)
Teeyacool
Newbies
*
Offline



Posts: 7
How to debug ESP32 code with VisualStudio+vMicro?
Jan 7th, 2019 at 6:07am
 
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
 
Visual Micro
Administrator
*****
Offline



Posts: 10142
United Kingdom
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #1 - Jan 7th, 2019 at 1:14pm
 
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
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #2 - Jan 8th, 2019 at 1:31am
 
I'm using serial/usb upload. The attachments shows my set.
Back to top
 

2019-01-08__1_.png (621 KB | 29 )
2019-01-08__1_.png
2019-01-08.png (489 KB | 29 )
2019-01-08.png
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10142
United Kingdom
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #3 - Jan 9th, 2019 at 1:58pm
 
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
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #4 - Jan 10th, 2019 at 1:44am
 
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.
Back to top
« Last Edit: Jan 10th, 2019 at 2:00am by Teeyacool »  

2019-01-10__2_.png (522 KB | 30 )
2019-01-10__2_.png
2019-01-10.png (396 KB | 27 )
2019-01-10.png
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10142
United Kingdom
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #5 - Jan 11th, 2019 at 5:21pm
 
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
Back to top
« Last Edit: Jan 11th, 2019 at 5:22pm by Visual Micro »  
WWW  
IP Logged
 
Teeyacool
Newbies
*
Offline



Posts: 7
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #6 - Jan 12th, 2019 at 1:19am
 
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
 
Visual Micro
Administrator
*****
Offline



Posts: 10142
United Kingdom
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #7 - Jan 12th, 2019 at 1:42am
 
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++):
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
Re: How to debug ESP32 code with VisualStudio+vMicro?
Reply #8 - Jan 12th, 2019 at 6:19am
 
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 Topic Print