microsoft / microsoft/vscode-cpptools

Expressions display incorrectly in watch window

Open
#660 2 comments 0 reactions 0 assignees View on GitHub

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:

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.