Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying a long value from debug watch results in pasting partial value #5470

Closed
da2r-20 opened this issue May 12, 2020 · 3 comments
Closed
Assignees
Labels
debugger fixed Check the Milestone for the release in which the fix is or will be available.

Comments

@da2r-20
Copy link

da2r-20 commented May 12, 2020

Type: Debugger

Describe the bug

  • Version: 1.45.0
  • Commit: d69a79b73808559a91206d73d7717ff5f798f23c
  • Date: 2020-05-07T15:57:33.467Z
  • Electron: 7.2.4
  • Chrome: 78.0.3904.130
  • Node.js: 12.8.1
  • V8: 7.8.279.23-electron.0
  • OS: Darwin x64 18.7.0
  • C/C++ Extension Version: 0.27.1

While remote debugging I copied a long value from the watch area.
Pasting it resulted in a partial string with '...' at the end

To Reproduce

  1. Start a debugging session
  2. add an expression that has a long value to watch
    Screen Shot 2020-05-11 at 8 49 26
  3. Copy value
  4. paste it somewhere in a text area
  5. the pasted text appears is limited and ends with '...'
    Screen Shot 2020-05-11 at 8 50 33

Additional context
Initially I've opened a ticket here microsoft/vscode#97444
I was told to open it here and mention:

VSCode sents the clipboard context when copying. Their extension should set the capability supportsClipboardContext and respect the clipboard context by evaluation the full thing.

@WardenGnaw
Copy link
Member

You can work around this by adding the following to your launch.json with setupCommands or running it in the debug console with -exec:
set print elements 0.

The correct fix is to run set print elements 0 before evaluating the request when it is a clipboard context and then reset it back to the value of show print elements before we changed it to 0.

@WardenGnaw WardenGnaw added fixed Check the Milestone for the release in which the fix is or will be available. and removed Feature Request labels Jun 12, 2020
@sean-mcmanus
Copy link
Contributor

The fix is available with https://github.com/microsoft/vscode-cpptools/releases/tag/0.29.0-insiders .

@igiona
Copy link

igiona commented Sep 19, 2023

HI,

I'm facing this very same issue while debugging Rust, as described here into details: rust-lang/rust-analyzer#15619.

VsCode: 1.82.2
CppTools extension: v1.17.5

My launch settings are:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(Windows) Launch",
            "type": "cppvsdbg",
            "request": "launch",
            "preLaunchTask": "rust: cargo build",
            "program": "${workspaceFolder}/target/debug/${workspaceFolderBasename}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceRoot}",
            "environment": [],
        }
    ]
}

Any suggestion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugger fixed Check the Milestone for the release in which the fix is or will be available.
Projects
None yet
Development

No branches or pull requests

4 participants