microsoft / microsoft/vscode-cpptools

displaying "this" pointers data in watch window

Open
#3,305 1 comment 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

Type: Debugger
I am using visual code in Debian with gdb.

Version: 1.31.1 Commit: 1b8e8302e405050205e69b59abb3559592bb9e60 Date: 2019-02-12T02:19:29.629Z Electron: 3.1.2 Chrome: 66.0.3359.181 Node.js: 10.2.0 V8: 6.6.346.32 OS: Linux x64 4.9.0-8-amd64
C/C++ extension version : 0.21.0

I remember in visual studio pro its possible to type "*this" in watch window and I can see members of the class object and regardless of the abstraction or template the class name is also displayed.

However in visual studio code, there is no such information is displayed for *this. All it can display is the address of the "this" pointer. Can someone help me how to get it working in visual studio code ? Can I know the gdb command otherwise to display such information ?

Thanks.

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

No source file or test is named. Start by reproducing the *this watch expression in VS Code's C/C++ extension with GDB on Debian, comparing it with the reported Visual Studio behavior. Done means the watch window shows the pointed-to class type and members rather than only the pointer address.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux, vscode
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.