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 Error when debugging line by line esp8266 (Read 2507 times)
Christoph
Junior Member
**
Offline


Posts: 32
Joined: Sep 4th, 2020
Error when debugging line by line esp8266
Sep 4th, 2020 at 11:47am
Print Post  
Hello powerful vmicro community!
I m trying to build up environment for debugging esp32 or esp8266 , right now without Hardware Debugger like segger jtag or the one I bought and is delivered soon -- > FT2232H MINI MODULE.
My purpose is to make some data acquisition unit with the esp’s and get access to the recorded data through webserver and also to download from SPIFF.

Here to my problem :
When I start debugging like in picture one, I am unable to toggle trough code step by step because I always getting Error “Exception Unhandled – Unknown stopping event”
Dose not matter if just digital write or printf one step and error occurs : (
Also notice when more than one breakpoint I get “Command aborted. See the output window.. “ this tells me “A program is being debugged already”
Output as .txt is attached.

I would be glad if I can get information about whats the best way to debug bigger projects on ESP32 line by line to become more knowledge about whats going on inside and also be able to make more breakpoints.

Thanks in advance!
Christoph 
  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error when debugging line by line esp8266
Reply #1 - Sep 4th, 2020 at 12:53pm
Print Post  
Thanks for the info. 

Using GDB Stub isn't always ideal but it can be useful. There are various reasons why the Microsoft debugger raies the message. 

For example, it looks like you are stepping in a core source but optimization is only disabled for Project and Libraries. It is also often not possible to switch off optimization for any entire core because the design of the core can't work with optimization off.  There are code commands that can switch off optimization only for a chunk of code but that can be more complicated to use and doesn't guarantee to resolve the issue. It will take some experimenation and the issue might simply be that the timer code you are stepping is a potential issue whilst using GDBStub.

Is library and project code stepping okay?

  
Back to top
WWW  
IP Logged
 
Christoph
Junior Member
**
Offline


Posts: 32
Joined: Sep 4th, 2020
Re: Error when debugging line by line esp8266
Reply #2 - Sep 7th, 2020 at 2:36pm
Print Post  
Thank you for the fast reply.

No I would say not, dose not matter what I want to debug always ran into the problem. Want to make just a window filtering function and when it comes to analog read it tells me "Debugger was  unable to continue the process"

Unfortonately I do not understand the optimization dropdown list , there are tutorials they explain you have to choose "No Project + Lib optimization" but I get some Error. Then I choose "Default" and it works.

Debugging is not realy helpul when always get the error when stepping in core source.
I would like to step into ESP Wifi libs or AsynchWebserver, what should be the best way to do this, GDB Stub is not the best way is this done better with hardware debugger?

Thank you for your help!
  
Back to top
 
IP Logged
 
Christoph
Junior Member
**
Offline


Posts: 32
Joined: Sep 4th, 2020
Re: Error when debugging line by line esp8266
Reply #3 - Sep 8th, 2020 at 6:17am
Print Post  
Okay as a newbie I only now realised that analogRead function would also be sutch kind opf a core source. So I commend out and again first stepping and I get the error like in the picture. When I then continue without stepping just with continue it works fine, as long as I get to some core function like the end of void loop() {}.

Second attachment is the output when I #include <ESP8266WiFi> lib. Then build failed Sad

Can somebody help me what I am doing wrong with debugging?

Is debugging via serial (without real debugger hardware) so weak, or I do not have the proper libs and configs ?

Thanks in advance!
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Christoph
Junior Member
**
Offline


Posts: 32
Joined: Sep 4th, 2020
Re: Error when debugging line by line esp8266
Reply #4 - Sep 8th, 2020 at 8:53am
Print Post  
Useful information

https://www.visualmicro.com/page/User-Guide.aspx?doc=Debugging.html#vmd9

Where Breakpoint cannot be set
Breakpoints cannot be set in:


Library code: If you want to set breakpoints in library source files, add these files to you project as normal source files, instead of adding the library.

Interrupt service routines (ISR):  In order to debug ISRs, you need a hardware debugger, no software debugger like Visual Micro's
  
Back to top
 
IP Logged
 
Christoph
Junior Member
**
Offline


Posts: 32
Joined: Sep 4th, 2020
Re: Error when debugging line by line esp8266
Reply #5 - Sep 9th, 2020 at 7:53am
Print Post  
Hi again,

after install and setting up everything new debugging works! Nevertheless I am not satisfied about because I am in minde of other debugging experience, at witch I used hardware debugger from segger. 
I use open source code from here 

https://github.com/G6EJD/ESP32-ESP8266-File-Download-Upload-Delete-Stream-and-Di...

and want see what is going on in the code behinde the .ino file. I included the .h files into my project but Serial debuggung only let me toggel through .ino and hardware debugger respond with error like in the picture and finaly 

For help, type "help".
Type "apropos word" to search for commands related to "word".
=cmd-param-changed,param="remote hardware-breakpoint-limit",value="1"
=cmd-param-changed,param="remote hardware-watchpoint-limit",value="1"
=cmd-param-changed,param="remote interrupt-on-connect",value="on"
=cmd-param-changed,param="serial baud",value="115200"
Remote debugging using \\.\COM7
Ignoring packet error, continuing...
Ignoring packet error, continuing...
=cmd-param-changed,param="pagination",value="off"
The program '' has exited with code 42 (0x2a).


Can this be done with any environment typ / hardware or what else including vMicro?

Pleas help me I would appreciate any response for help, also for the information I would have to get my owne debugging properties "MI Debugger Properties". Although I have no knowledge about this but I would know what to do.

I have esp8266 and soon esp32 with ft2232h mini module debugger.

Many thanks!



« Last Edit: Sep 9th, 2020 at 7:54am by Christoph »  

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


Posts: 2175
Joined: Feb 13th, 2019
Re: Error when debugging line by line esp8266
Reply #6 - Sep 9th, 2020 at 9:16am
Print Post  
The ESP8266 does not support an external hardware debugger to our knowledge so it is limited to the GDB Stub or Visual Micro Serial Debugger.

There should be no need to configure a custom Debugger Properties file for the ESP32 + FT2232H module as these are pre-configured in the drop down lists in Visual Micro.

The ESP32 is compatible with a number of different hardware debuggers, and these are listed on our compatability page below:
Debugger Support Listing

The error in your last post seems to be trying to connect over Serial, however the FT2232h debugger connects via OpenOCD, there are guides on setting up this debugger for the ESP32 below:
ESP32 Hardware Debugging


If you could follow the Hardware Debugging Troubleshooter it will guide you to additional logs and suggestions, which may help us understand the connection issue further, and 0x42 often implies there is a physical connection issue.
Doc: Hardware Debugging Troubleshooter Guide
Video: Hardware Debugger Troubleshooting
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint