microsoft / microsoft/vscode-cpptools

Cannot copy array element value from variables view of debugger (gdb / gfortran)

Open
#6,678 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

debugger more info needed
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: Ubuntu 18.04
  • VS Code Version: 1.52.1
  • C/C++ Extension Version: 1.1.3
  • Other extensions you installed (and if the issue persists after disabling them): Modern Fortran, Fortran Breakpoint Support
  • A clear and concise description of what the bug is.

Instead of copying the value (a number in this case) it copies "-var-create: unable to create variable object".

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

  1. Create a Fortran program that uses numeric arrays
  2. Compile it with gfortran -g
  3. Start the debugger and break such that the array is in view
  4. Expand the array variable and try to copy the value of one of the items
  5. Paste the copied value somewhere

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.

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 a gfortran-built program in the debugger, using the Variables view and the launch.json settings mentioned in the report. Inspect the behavior around copying an expanded array element and the reported “-var-create: unable to create variable object” response; done means copying pastes the element's numeric value.

Written by the indexing model from the issue text.

Assessment

Tech stack
fortran
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.