Hello Dear Community Members,
I’m using PlatformIO in Eclipse IDE.
While debugging, I can’t read any value of my variable. I can read value when I pause debugging.
For changing the value of the variable, I have to pause my debug then I can change the value.
You can see the “Target not available” error below
This is my first question.
Second question is:
When I pause the debug session, I get this error. What is the meaning of this error?
Any help will be appreciated.
Yes. For reading a variable the target should be halted.
When you build Arduino-ESP32 firmwares, ESP-IDF is linked in by a prebuilt, static library. Meaning on some server the source code was compiled and the resulting
libxyz.a files were then published. So when the Arduino firmware halts, it is likely that is inside some ESP-IDF internal code and the source paths are of course not available on your computer.
That is usually not a problem as you can assume ESP-IDF as working and only need to debug your firmware and the Arduino core functions can be stepped into just fine. If you however absolutely need to debug ESP-IDF internals, use the approach shown in the example library, which is a ESP-IDF base project with the Arduino core on top. That makes all source code available and debuggable.
There is a Live Expression opiton in STM32CubeIDE, which you can read a variable’s value without halting the target.
As you know, STM32CubeIDE based on Eclipse. That’s why I asked this question. ,
As result we have no chance for read a variable’s value, isn’t it?
I got it, thanks a lot.
Sure, and it’s not implemented like that in standard Eclipse as far as I know. Probably uses some special plugin / modifications.
I’ll search for this plugin. Thanks for your help