Are there any plans to document the actual nuts and bolts of the debugging process once you have managed to get it started? I can only find docs about setting it up.
For example(s):
What is the variables area for? (Nothing ever shows up there for me).
How do you know when the debugger has stopped thinking (slowly) about what to do next? (The debugging console is no help here when single stepping).
Why does 'step over' sometimes land in (I think) some RTOS code and how do you get out of it.
I have found that only the 'Light-high contrast' theme shows the paused line of code clearly enough for me to see without squinting at the screen.
It only shows when the execution is paused at a breakpoint. For example, here I placed a breakpoint at line 57 of the File > Examples > 02.Digital > BlinkWithoutDelay sketch:
The Arduino IDE developers are tracking something like this here:
However, I'm wondering whether you are referring to the same problem. The reason is that I find the contrast of the current line highlight is reasonably good with the themes other than "Dark".
Here I can see the execution point is at line 35 by the gray background color of that line when using the "Light" theme:
It is somewhat subtle, but I personally find it to be sufficient (I understand that it might not be for others, but we provide the "High Contrast" themes to accommodate that).
And here I can see it is at line 35 by the brown outline and line number coloration when using the "Dark High Contrast" theme:
However, my real request was not about the specific issues that I raised, and to which you responded, but rather about a need for documentation of the features of how to use the debugger once you do have it set up correctly and are in debug mode.
However, I want to respond to your answers.
Value of variables. I loaded the BlinkWithoutDelay sketch and, yes, I saw currentMillis showing up as a Local, but I do not see any of the global variables, e.g. ledState, showing up as Global. Should they have been there?
I can put them in the Watch area and they behave as expected there.
Poor contrast. Yes, that looks like the same issue. It is probably worse on some monitors than on others. I now find the Dark High Contrast theme to be the best (for me) when debugging - actually, it is the only one that is useful.
Does it happen always in the same place or is it a random function? It might be due to how the code is compiled in that exact context, or an interrupt that confused the internal debugger. You should be able to "step out", or just run and hit another breakpoint.
Thanks for the report, I will flag this for further investigation.
Thanks for the suggestion. We will try to improve the Debugging with IDE 2 tutorial by integrating some more detailed descriptions of the integrated features.
Yes, I can step out of this. I think this behavior should be documented as it is surprising to a newbie like me.
I will shut up if you ask me, but in the meantime I would like to post my user experiences as I try to figure out how to approach debugging an ESP32-S3. Some issues will be errors or misunderstandings on my part and some will be things that I think should be changed or documented. (Full disclosure: right now I am using a knock-off ESP32-S3 devkit v1 from Aliexpress but I am expecting delivery of a Nano ESP next week).
Issue 1: Debugging seems to be more reliable when I use 'Sketch->Upload using Programmer' instead of pressing the Upload button. Is this to be expected? Perhaps the Start Debugging button should first perform a Compile and Upload using Programmer?
Issue 2 The output on the Debug Console and gdb-server tabs are massive, continuous and unintelligible. The messages are full of warnings and errors that I have no idea what to do about.
If the debugger seems to be working then I try to ignore them.
The Debug Console looks like it can be used for something as it has an input command line, but I have no idea what the commands might be. It does respond to 'help' with a long list of possible commands.
You can find a lot of information about using it by searching on the Internet. However, we recommend using the GUI interface of the IDE's sketch debugger instead of the command line interface offered in the Debug Console.
Generally you would only use the command line interface for very advanced operations for which there is no GUI interface, if you are familiar with GDB and prefer using it directly instead of a GUI, or when troubleshooting some unexpected behavior of the GUI.