VS Arduino
Visual Micro >> Usb/Serial/WiFi Debugging >> Debugger not working in library cloned to project
https://www.visualmicro.com/forums/YaBB.pl?num=1618091969

Message started by jimf on Apr 10th, 2021 at 9:59pm

Title: Debugger not working in library cloned to project
Post by jimf on Apr 10th, 2021 at 9:59pm
I'm trying to debug an Adafruit library using the serial debugger find that breakpoints/tracepoints work fin in my loop{} but not in the in the library.  I'm using an ESP32 board.  The library is not mine so I cloned it to the project.  By using Serial.print statements, I know I'm executing code in the library.  However, the breakpoint set just after the Serial.print statement does not work.  The optimization is set for "no project + library optimization".

In the screen shot attached notice there are 2 breakpoints set, one in loop{} and the other in Adafruit_seesaw.cpp.  I put a Serial.print statement just before the breakpoint in the Adafruit_seesaw library.  The output window shows that the Serial.print statement in the library is working and the breakpoint in loop{} is working.  The screenshot shows that execution has paused, and it is paused at line 52 in loop{}.   

Soooooo, I know serial debug is working as expected in loop{} but not in the library code that I know is being executed.  I found a post about someone having similar issues with Arduino Mega....and the solution was to use hardware debugging.  I'm using ESP32 so not sure what to do.  I'd prefer to use serial debug if possible.  Thanks.....jimf
Screenshot_2021-04-10_175007.jpg ( 395 KB | 3 Downloads )

Title: Re: Debugger not working in library cloned to project
Post by Simon@Visual Micro on Apr 12th, 2021 at 8:46am
Thanks for the report.

Can you confirm the library has been cloned into your solution as a Shared Project?

Just to note the optimization changes should not be required for the Serial Debugger.

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.