microsoft / microsoft/vscode-cpptools

Cannot evaluate any Debug Console REPL command

Open
#6,259 2 comments 2 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

Describe the bug

  • OS and Version: Linux, Ubuntu 20.04 LTS on Windows_NT x64 10.0.18363 WSL2
  • VS Code Version: 1.49.3 (2af051012b66169dde0c4dfae3f5ef48f787ff69)
  • C/C++ Extension Version: v1.0.1
  • Other extensions you installed (and if the issue persists after disabling them): none
  • A clear and concise description of what the bug is.Debug console REPL commands (e.g. cout << "Hello World";) fail with error message -var-create: unable to create variable object. I am able to print out variables by just typing them and pressing enter.

To Reproduce
Please include a code sample and launch.json configuration.
Steps to reproduce the behavior:

  1. I used the tutorial example from cpptools.
  2. Configure launch.json to stop at entry and enter debug mode
  3. Execute command 'cout << "Hello World";"
  4. Observe error

Additional context
If applicable, please include logging by adding "logging": { "engineLogging": true, "trace": true, "traceResponse": true } in your launch.json
Add any other context about the problem here including log or error messages in your Debug Console or Output windows.

I add a zip helloworld.zip with the output, as well as the debug console output. Note that I cannot seem to enable traceResponse, as it causes the build to fail:

> Executing task: /bin/g++ -g extension-output-#5 -o ./extension-output-#5 <

whereas normally it says:

> Executing task: /bin/g++ -g /home/tweyens/test_Cpp/projects/helloworld/projects/helloworld/helloworld.cpp -o /home/tweyens/test_Cpp/projects/helloworld/projects/helloworld/helloworld <

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 issue with the attached helloworld.zip, its launch.json configuration, and the tutorial example. Run the Debug Console command cout << "Hello World"; and inspect the reported -var-create failure alongside the debug output. Done means valid REPL commands evaluate successfully without that 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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.