microsoft / microsoft/vscode-cpptools

When the display format of a variable is set to hexadecimal, the context menu for debugging variables is not visible.

Open
#13,742 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

debugger help wanted
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Environment
  • OS and version: win10
  • VS Code: 1.101.1
  • C/C++ extension: 1.26.3
  • GDB version: 9.2
Bug Summary and Steps to Reproduce

Bug Summary:
When I used -exec set output-radix 16 to change the display format of variables, the context menu for debugging variables disappeared.
However, when I reset its display format to decimal or octal, the Debug Variables context menu returns to normal.

Debugger Configurations
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "cpp-debug1",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/a.exe",
            "cwd": "${workspaceFolder}",
            "miDebuggerPath": "gdb.exe",
            "stopAtEntry": true,
            "args": [],
            "logging": {
                "engineLogging":true
            }
        }
    ]
}
Debugger Logs
-exec set output-radix 16
1: (8914) <-1042-interpreter-exec console "set output-radix 16"
1: (8926) ->~"Output radix now set to decimal 16, hex 10, octal 20.\n"
1: (8926) ->=cmd-param-changed,param="output-radix",value="16"
1: (8926) ->1042^done
1: (8926) 1042: elapsed time 12
1: (8926) ->(gdb)
1: (8926) ->&"\n"
Output radix now set to decimal 16, hex 10, octal 20.
=cmd-param-changed,param="output-radix",value="16"
1: (8926) ->^done
1: (8926) ->(gdb)
1: (8929) <-1043-var-create --thread 1 --frame 0  - * "global_var"
1: (8942) ->1043^done,name="var13",numchild="0",value="0xa",type="int",has_more="0"
1: (8942) 1043: elapsed time 12
1: (8942) ->(gdb)
1: (8942) ->&"\n"
1: (8942) ->^done
1: (8942) ->(gdb)
1: (8942) <-1044-stack-list-variables --thread 1 --frame 0 0
1: (8958) ->1044^done,variables=[{name="argc",arg="1"},{name="argv",arg="1"},{name="debug1"},{name="d1"},{name="debug2"},{name="d2"},{name="debug3"},{name="d3"}]
1: (8958) 1044: elapsed time 15
1: (8958) ->(gdb)
1: (8958) <-1045-var-create --thread 1 --frame 0  - * "argc"
1: (8958) ->&"\n"
1: (8958) ->^done
1: (8958) ->(gdb)
1: (8974) ->1045^done,name="var14",numchild="0",value="0x4",type="int",thread-id="1",has_more="0"
1: (8974) 1045: elapsed time 15
1: (8974) ->(gdb)
1: (8974) <-1046-var-create --thread 1 --frame 0  - * "argv"
1: (8974) ->&"\n"
1: (8974) ->^done
1: (8974) ->(gdb)
1: (8975) ->1046^done,name="var15",numchild="1",value="0xc917c0",type="const char **",thread-id="1",has_more="0"
1: (8975) ->(gdb)
1: (8975) 1046: elapsed time 0
1: (8975) ->&"\n"
1: (8975) <-1047-var-create --thread 1 --frame 0  - * "debug1"
1: (8975) ->^done
1: (8975) ->(gdb)
1: (8988) ->1047^done,name="var16",numchild="0",value="0x4019e0",type="int",thread-id="1",has_more="0"
1: (8989) ->(gdb)
1: (8989) 1047: elapsed time 13
1: (8989) ->&"\n"
1: (8989) ->^done
1: (8989) <-1048-var-create --thread 1 --frame 0  - * "d1"
1: (8989) ->(gdb)
1: (9003) ->1048^done,name="var17",numchild="1",value="0x400080",type="int *",thread-id="1",has_more="0"
1: (9003) ->(gdb)
1: (9003) 1048: elapsed time 14
1: (9004) ->&"\n"
1: (9004) <-1049-var-create --thread 1 --frame 0  - * "debug2"
1: (9004) ->^done
1: (9004) ->(gdb)
1: (9020) ->1049^done,name="var18",numchild="0",value="0x401a3b",type="int",thread-id="1",has_more="0"
1: (9020) 1049: elapsed time 16
1: (9020) ->(gdb)
1: (9020) <-1050-var-create --thread 1 --frame 0  - * "d2"
1: (9020) ->&"\n"
1: (9020) ->^done
1: (9020) ->(gdb)
1: (9036) ->1050^done,name="var19",numchild="1",value="0x3dd000",type="int *",thread-id="1",has_more="0"
1: (9036) 1050: elapsed time 15
1: (9036) ->(gdb)
1: (9036) <-1051-var-create --thread 1 --frame 0  - * "debug3"
1: (9036) ->&"\n"
1: (9036) ->^done
1: (9036) ->(gdb)
1: (9052) ->1051^done,name="var20",numchild="0",value="0x61ff50",type="int",thread-id="1",has_more="0"
1: (9052) 1051: elapsed time 15
1: (9052) ->(gdb)
1: (9052) ->&"\n"
1: (9052) <-1052-var-create --thread 1 --frame 0  - * "d3"
1: (9052) ->^done
1: (9052) ->(gdb)
1: (9068) ->1052^done,name="var21",numchild="1",value="0x0",type="int *",thread-id="1",has_more="0"
1: (9068) 1052: elapsed time 15
1: (9068) ->(gdb)
1: (9068) ->&"\n"
1: (9068) ->^done
1: (9068) ->(gdb)
1: (111411) <-1053-data-evaluate-expression --thread 1 --frame 0 "&(debug1)"
1: (111419) ->1053^done,value="0x61ff10"
1: (111420) 1053: elapsed time 8
1: (111420) ->(gdb)
1: (111420) ->&"\n"
1: (111420) ->^done
1: (111420) ->(gdb)
1: (111421) <-1054-data-evaluate-expression --thread 1 --frame 0 "sizeof(debug1)"
1: (111435) ->1054^done,value="0x4"
1: (111435) 1054: elapsed time 14
1: (111435) ->(gdb)
1: (111436) ->&"\n"
1: (111436) ->^done
1: (111436) ->(gdb)
1: (112024) <-1055-data-evaluate-expression --thread 1 --frame 0 "&(debug1)"
1: (112036) ->1055^done,value="0x61ff10"
1: (112037) 1055: elapsed time 12
1: (112037) ->(gdb)
1: (112037) ->&"\n"
1: (112037) <-1056-data-evaluate-expression --thread 1 --frame 0 "sizeof(debug1)"
1: (112037) ->^done
1: (112037) ->(gdb)
1: (112052) ->1056^done,value="0x4"
1: (112052) ->(gdb)
1: (112052) 1056: elapsed time 15
1: (112053) ->&"\n"
1: (112053) ->^done
1: (112053) ->(gdb)
Other Extensions

No response

Additional Information

No response

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

Reproduce the issue in the VS Code C/C++ extension using GDB and the reported -exec set output-radix 16 command. Compare the Debug Variables context menu with decimal or octal output, using the supplied debugger configuration and logs as the starting point. Done means the context menu remains visible when variables are displayed in hexadecimal.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.