Unable to watch float variables

Hi
I am working with Visual Studio Code with the Arduino and Platform IO extensions.
I am mostly successful to debug code by setting breakpoints and adding variables to the watch window.

Today I was unsuccessful attempting to watch a float variable. I getthe following error
-var-create: unable to create variable object (from var-create watch_343d9040a671c45832ee5381860e2996} @ “fff”)

I was not able to input anything in the memory window.

I have a big project coming up and right now I’m looking for the best IDE to use with an Arduino MEGA 2560 Rev 3

So far the Platform IO has been the best choice but either it has limitations or hopefully I’m either missing something.

I have heard that the Platform IO extension works with CLion as well but I can’t believe this would help me but who knows.

All suggestions welcome .

Rick

What is the most minimal code + platformio.ini to reproduce your problem?

Did you try to disable compilation optimizations?

debug_build_flags = -O0 -ggdb3 -g3

(docs).

Hi Max,
I did not disable compiler optimization nor did I know how, but I will save this information for future reference. Thanks

After a while, the float variable I was using appeared. Why? I don’t know but I’m happy it did so. It happens with other variable types as well. When they do show up I am also able to find their memory address and I found out how to view memory locations which works well but is not perfect.

Thanks for getting back to me.

Best,

Rick