Skip to content

debug: bytes to string "Copy Value" truncates string if's too long #3893

@multi-io

Description

@multi-io

What version of Go, VS Code & VS Code Go extension are you using?

Version Information

go1.24.6 darwin/arm64
Cursor 1.5.9
de327274300c6f38ec9f4240d11e82c3b0660b20
arm64

If this is fixed in upstream Vscode, the ticket can obv. be closed and in that case, sorry for wasting your time. But I didn't find any closed/merged tickets that address this issue, so my suspicion is the problem still persists.

Describe the bug

I'm in a breakpoint in a debugger session and I'm inspecting a []byte variable (length 554 bytes) that contains an ASCII string, and if I hover over it and click "Copy Value", it copies a truncated version of the string, ending in "...+42 more".

I found no way to copy the whole string.

If you expand the "> [xxx.xxx]" markers in the byte array representation, you can see that the debugger has the whole value, so it looks very much like this is a frontend problem.

Screenshots or recordings

Image

Resulting string (secrets x-ed out while retaining the exact length):

"PATCH /api/v2/projects/35484c8da82d4c3682a4d25f0d321a97/clusters/nrr7gqkflk HTTP/1.1\r\nHost: dev.xxxxxxxxxxx\r\nUser-Agent: Terraform/1.9.5\r\nContent-Length: 198\r\nAccept: application/json\r\nAuthorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx application/json\r\nAccept-Encoding: gzip\r\n\r\n{\"labels\":{\"xxxxxxxxx.de/managed\":\"\",\"xxxxxxxxx.de/managed-by-terraform\":\"true\"},\"name\":\"zd-182397-tf-import-ncs-cluster\",\"spec\":{\"admissionPlugins\":null,\"c...+42 more"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions