microsoft / microsoft/vscode-cpptools
[cppvsdbg] "expression must have a pointer type" in the Watch window for types that implement operator->()
Open
Nobody has claimed this yet.
bug
debugger
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
- Use the cppvsdbg debugger.
- Use object->val in the Watch window, where object is a type that implements operator->().
Bug: The Watch windows shows the error "expression must have a pointer type" instead of evaluating the operator->(), which returns a pointer type and then using that result to do the ->val to access the value.
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 issue in the cppvsdbg debugger's Watch window with an object->val expression where the object's type implements operator->(). Trace how the expression is evaluated; done means the operator->() result is recognized as a pointer and its val member can be accessed without the pointer-type error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100