Visual Studio Ide for Arduino
https://www.visualmicro.com/forums/YaBB.pl
Visual Micro >> Usb/Serial/Udp Debugging >> How to debug ESP32 code with VisualStudio+vMicro?
https://www.visualmicro.com/forums/YaBB.pl?num=1546841224

Message started by Teeyacool on Jan 7th, 2019 at 6:07am

Title: How to debug ESP32 code with VisualStudio+vMicro?
Post by Teeyacool on 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?

Title: Re: How to debug ESP32 code with VisualStudio+vMicro?
Post by Visual Micro on 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

Title: Re: How to debug ESP32 code with VisualStudio+vMicro?
Post by Teeyacool on Jan 8th, 2019 at 1:31am
I'm using serial/usb upload. The attachments shows my set.
2019-01-08__1_.png (621 KB | 42 )
2019-01-08.png (489 KB | 35 )

Title: Re: How to debug ESP32 code with VisualStudio+vMicro?
Post by Visual Micro on 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

Title: Re: How to debug ESP32 code with VisualStudio+vMicro?
Post by Teeyacool on 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.

2019-01-10__2_.png (522 KB | 32 )
2019-01-10.png (396 KB | 30 )

Title: Re: How to debug ESP32 code with VisualStudio+vMicro?
Post by Visual Micro on 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

Title: Re: How to debug ESP32 code with VisualStudio+vMicro?
Post by Teeyacool on 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/index.html?highlight=JTAG

Title: Re: How to debug ESP32 code with VisualStudio+vMicro?
Post by Visual Micro on 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.

Title: Re: How to debug ESP32 code with VisualStudio+vMicro?
Post by Teeyacool on 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!

Visual Studio Ide for Arduino » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2019. All Rights Reserved.