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

Copy Value in Watch panel copies truncated value with ... for a long/big string. #175758

Closed
HamedFathi opened this issue Mar 1, 2023 · 7 comments · Fixed by microsoft/vscode-js-debug#1586
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@HamedFathi
Copy link

HamedFathi commented Mar 1, 2023

Does this issue occur when all extensions are disabled?: No

  • VS Code Version: 1.75.1
  • OS Version: Windows

Steps to Reproduce:

  1. You need to try with a long/big string value and put it inside the Watch panel for debugging.
  2. Try to use Copy Value and pasted it into the Notepad for example.
  3. You have no access to real value like UI (tooltips/popups) you will get truncated value with ... in middle!

In UI make sense to me to have truncated value for long/big string

Screenshot_1

But, why I should not have access to the real value by Copy Value in the Watch panel?

Screenshot_2
image

For a while, I was looking for why when I am pasting the value in jwt.io the signature and data there were invalid!!!

@vscodenpa
Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.75.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@HamedFathi HamedFathi changed the title Copy Value in Watch panel copies truncated value with ... for a long/big strings. Copy Value in Watch panel copies truncated value with ... for a long/big string. Mar 1, 2023
@roblourens roblourens assigned connor4312 and unassigned roblourens Mar 2, 2023
@roblourens
Copy link
Member

I don't remember whether js-debug is expected to return the full value for the clipboard context?

@HamedFathi
Copy link
Author

HamedFathi commented Mar 2, 2023

Then how should I have access to the real value of my variable? popup truncated, copy value inside debugger (watch panel) truncated.

Why should not have expect to access to the real value of the variable from debugger and watch panel? So what is the purpose of having watch panel then?

Truncating values for UI make sense but not everywhere!

At least console.log works!

@connor4312
Copy link
Member

This should definitely work, and does for me. Could you grab some logs so I can see what's going on on your end?

/jsDebugLogs

@vscodenpa
Copy link

Please collect trace logs using the following instructions:

If you're able to, add "trace": true to your launch.json and reproduce the issue. The location of the log file on your disk will be written to the Debug Console. Share that with us.

⚠️ This log file will not contain source code, but will contain file paths. You can drop it into https://microsoft.github.io/vscode-pwa-analyzer/index.html to see what it contains. If you'd rather not share the log publicly, you can email it to connor@xbox.com

@vscodenpa vscodenpa added the info-needed Issue requires more information from poster label Mar 2, 2023
@HamedFathi
Copy link
Author

HamedFathi commented Mar 3, 2023

This should definitely work, and does for me. Could you grab some logs so I can see what's going on on your end?

/jsDebugLogs

@connor4312

I am using playwright vscode to call the debugger so I do not have a launch.json in my project to enable the trace mode.

Is it possible to enable the trace globally to help you with more info?

I know does not help you but I just shared a gif to show how happened.
the value is a bearer token that came from Azure which is complete and correct in console.log but truncated with ... as you can see.

code2

@connor4312
Copy link
Member

No worries, thanks for the gif. I was able to reproduce.

@connor4312 connor4312 added bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues and removed bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster labels Mar 3, 2023
@connor4312 connor4312 added this to the March 2023 milestone Mar 3, 2023
connor4312 added a commit to microsoft/vscode-js-debug that referenced this issue Mar 3, 2023
@amunger amunger added the verified Verification succeeded label Mar 22, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants