Gives confusing hints when different defining spellings.
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 32/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- cpp, typescript
- Domaine
- devtools
Piste de recherche
Commencez par reproduire le comportement avec les configurations tasks.json et launch.json fournies, en utilisant les versions de GDB signalées et les deux syntaxes de déclaration de pointeur. Comparez la valeur affichée par le débogueur pour chaque cas et examinez le point d'entrée de l'extension C/C++ pour les indications de variables ou l'évaluation d'expressions ; le travail est terminé lorsque le comportement d'affichage est clairement défini et couvert par un test de régression.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Environment
- OS and version: Windows 7 x64 SP1 and Neon Linux 5.24
- VS Code: 1.67.2
- C/C++ extension: 1.10.4 and 1.9.8
- OS and version of remote machine (if applicable):
- GDB / LLDB version: gdb 9.2 on Neon Linux and gdb 11.2 on Windows 7
Bug Summary and Steps to Reproduce
Bug Summary:
variable value hint bug when debug
code like this

Steps to reproduce:
- start debug
int* array show array's addreess.

int *array show array's element (first element of array).

I got confused a bit when I saw this, when I was debugging.
I think this behavior is weird, and it should be displaying the array address, not an indirect operation on the array address. These two ways of writing should have the same display content, right?
Should a judgment be added to distinguish whether the identifier is in the definition or the value?
Debugger Configurations
# tasks.json
// tasks.json
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc.exe 生成活动文件",
// "command": "D:\\SoftwareInstallation\\Windows7\\ProgramFiles\\MinGW-w64\\win32\\bin\\gcc.exe",
"command": "D:\\SoftwareInstallation\\Windows7\\ProgramFiles\\MinGW-w64\\posix-new\\winlibs-x86_64-posix-seh-gcc-11.3.0-mingw-w64msvcrt-10.0.0-r2\\mingw64\\bin\\gcc.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${workspaceFolder}\\bin\\${fileBasenameNoExtension}.exe",
"-fexec-charset=GBK"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "调试器生成的任务。",
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": false
}
}
],
"version": "2.0.0"
}
# launch.json
```json
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "gcc.exe - 生成和调试活动文件",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}\\bin\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
// "miDebuggerPath": "D:\\SoftwareInstallation\\Windows7\\ProgramFiles\\MinGW-w64\\win32\\bin\\gdb.exe",
"miDebuggerPath": "D:\\SoftwareInstallation\\Windows7\\ProgramFiles\\MinGW-w64\\posix-new\\winlibs-x86_64-posix-seh-gcc-11.3.0-mingw-w64msvcrt-10.0.0-r2\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: gcc.exe 生成活动文件"
}
]
}
### Debugger Logs
```shell
none
Other Extensions
No response
Additional Information
No response
- Langage dominant
- TypeScript
- Étoiles
- 6.2k
- Forks
- 1.7k
- Merge moyen
- 14 h 46 min
- PR mergées (30 j)
- 61
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoft/vscode-cpptools
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
microsoft/vscode-cpptools#14787 ·
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared libraries Ouvertebug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 1 personne assignée ·
-
Language Service more info needed
microsoft/vscode-cpptools#14778 · 1 commentaire · 1 personne assignée ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 64/100
microsoft/vscode-cpptools#14769 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
microsoft/vscode-cpptools#14768 · 1 commentaire ·
Toutes les issues de microsoft/vscode-cpptools
Issues similaires
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulté 1/5 Moins d'une heure Accessibilité débutants 76/100
-
code-quality refactoring
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
langchain-ai/deepagents#6450 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
vercel/react-tweet#225 ·