microsoft / microsoft/vscode-cpptools
Expressions display incorrectly in watch window
Open
Nobody has claimed this yet.
debugger
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Environemnt:
- VSCode Version: 1.11.2
- Cpptools: \cpvsbuild\Drops\MDDDebugger\CppTools\20170425.3\Extension\cpptools.vsix
- OS Version: Win10 x64
Steps to Reproduce:
- Open attachment in vscode.
- Set breakpoints at the line of 87,89 in source.cpp and 9,12 in mylib.cpp.
- Press F5 to start debugging(hit 87 line in source.cpp file).
- 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).
- Evaluate function "myclass->DisplayAge(30)" in watch window ,It inputs "Cannot evaluate function -- may be inlined"

- 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"

Log:log.txt
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the watch-window sequence using source.cpp, mylib.cpp, the linked attachment, and log.txt. Compare the first and second evaluations of myclass->DisplayAge(30) and inspect the debugger output for the differing results. Done means repeated evaluation reports the expected message consistently instead of -var-create: unable to create variable object.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100