microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.52k stars 1.55k forks source link

Expressions display incorrectly in watch window #660

Open qian6 opened 7 years ago

qian6 commented 7 years ago

Environemnt:

Steps to Reproduce:

  1. Open attachment in vscode.
  2. Set breakpoints at the line of 87,89 in source.cpp and 9,12 in mylib.cpp.
  3. Press F5 to start debugging(hit 87 line in source.cpp file).
  4. Press F5(hit 9 line in mylib.cpp file)->F10(hit 10 line in mylib.cpp file)->F5(hit 12 line in mylib.cpp file)->F5(hit 89 line in mylib.cpp file).
  5. Evaluate function "myclass->DisplayAge(30)" in watch window ,It inputs "Cannot evaluate function -- may be inlined" 04c62e98-2420-11e7-86eb-adfb6c6667a5
  6. Evaluate myclass->DisplayAge(30)" again.

Excepted: It inputs "Cannot evaluate function -- may be inlined"

Actual: It value is "-var-create: unable to create variable object" 04c62e98-2420-11e7-86eb-adfb6c6667a5

Log:log.txt

pieandcakes commented 7 years ago

@qian6 Where is the attachment you mention in 1? can you send it to me?

qian6 commented 7 years ago

optimization-1.zip