This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Identifier Not Found in Watch window

Hi,

 

I am having problem in tracking structures in watch window. It pops message, Identifier not found.

However, I can see other variables

 

I dont know what is wrong. Anything wrong with settings?

 

Thanks

Huzaifa

  • Huzaifa,

    The Watch window is able to display variables that are in scope at the current position of the program being executed - in other words, it displays global variables throughout the execution of your program, but local variables are only found during the execution of the routine where they are declared.

    The compiler options can also affect the debugging capabilities: the watch variable will properly display the variables if your project is built with the Full Symbolic Debug option (-g); also, if the optimization is being used the code may place variables in registers, losing its identifiers during the process (check slide 6 of the CGT Tips and Tricks presentation).

    These are the most common scenarios for this issue to happen.

    Hope this helps,

    Rafael

  • Hi Rafael, I'm in full symbolic debug mode (-g).  When I build/debug initially, I get this screen.  The values are not actually accurate but at least it displays something:

     

    When I hit run/pause I get this screen.  I must rebuild/debug again to clear the errors.