cancel
Showing results for 
Search instead for 
Did you mean: 

Live Expression view "Failed to evaluate expression"

FDi L.228
Associate II

Hello,

I'm currently using STM32CubeIDE (version 1.1.0) to write and debug a c++ program on a NUCLEO F767ZI.

I'm trying to use the "Live Expression" but it either doesn't update the variables live (it updates them when I pause the program") or it says "Failed to evaluate expression".

What is the correct way to configure the debugger?

My current configuration is:

  • Nucleo connected through the on-board stlink
  • the default values as in the screenshot

0690X00000AqPwxQAF.png

6 REPLIES 6
FDi L.228
Associate II

Update: it works with global variables. Is this the right behaviour or is this a bug? Will tracing local variables be available in the future?

You can trace local variable ONLY in the context they exist.

Otherwise they are just stack values with a whatsoever meaning.

Try to understand the C language concepts behind variable lifetime, visibility, and related memory allocation concepts.

Thanks, I passed programming 101.

I thought that it could maybe track variables on the stack

This is in programming 102 ...

Once the function defining the local variable is left, the same address / memory cell is used elsewhere, in another function, for another purpose.

Since the stack usually contains return addresses as well, messing with addresses of local (stack) variables outside it's context is a sure recipe for disaster.

Hassen7786
Associate

Try view the "expressions" and not the "live expressions". This worked for me 

nvm i misread :)