-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Advanced copy variable values in debugger #27950
Comments
Thanks for the short video. I didn't realize there was a copy value command. That is a handy option. I should clarify that I wish for an advanced variable copy feature. For example,inspecting complex data like arrays or multi-field objects. Copying the variable value within the debugger is limited to about 43 characters and appears like this The feature as it is now works for single values or with very simple multiple field objects. However, although I can see full array/object in the debugger, I cannot copy them. |
Got it, reopening and marking as a feature request |
how about an object, who's got many sub objects? The "Copy Value" option isn't there. Is there any way this can be done? |
I should have mentioned in the case of Python, which is what I'm using, I'm not seeing that json stringify function part of the json module, and also if I try to do a json.dump(myobj), my object isn't actually a json object so it's not serializable. Any easy alternative, short of using pickle.dumps(myobj)? |
any suggestion for those that work with other languages? |
I would like this functionality for PHP |
@anubhav756 Slick! |
Is there a way to get the full serialized representation of the value via 'Copy Value' action -- instead of the super truncated one ...? |
It doesn't work. Says error evaluating code. It is tested with drupal variables. |
pretty pretty please, request for php as well, driving me nuts 🦀 update. |
I am not sure what kind of object you are working with, but I was trying to copy all of the values from a specific column in a Pandas DataFrame when I stumbled upon this issue. I am running vscode 1.14.1 in a Conda Python environment. It turned out that the output limitation wasn't due to the Debug Console's abilities, but actually stemmed from a setting in pandas. Specifically, I issued |
Feature request. Please add "Copy expanded value" to Debug Variables context menu. |
@isidorn are we now using "evaluate" for simple and structured values? |
@weinand yes. Code pointer
|
So now every debug extension can now implement a "formatted deep copy" for structured objects by returning the string result of a |
You are correct I believe. |
@isidorn then we should ask debug extension authors to adopt that approach, right? @connor4312 @roblourens your opinion? |
@weinand yes. @connor4312 could try it out and let us know how it feels in practice :) |
Using "evaluate" for this feels weird, it's more of a formatting operation. Really dumb case, if this is supported in watches, and I have a watch for |
@roblourens valid point, but the implementation of |
@connor4312 very very cool! |
@isidorn yes, please ping the "usual suspects". |
Dear Debug extension authors, Now it is possible to implement advanced copy variable values for your debugger:
Example how @connor4312 has done it for js-debug microsoft/vscode-js-debug@a136ba5 Try it out and let us know how it goes. Thanks! @APerricone, @akaroml, @andysterland, @ayuckhulk, @DanTup, @daviwil, @devoncarew, @dibyendumajumdar, @DonJayamanne, @felixfbecker, @glennsarti, @gregg-miskelly, @hbenl, @iradul, @ivanbuhov, @joelday, @jpogran, @joshtynjala, @Kode, @miniwolf, @MSLaguana, @luabud, @lukaszunity, @ntotten, @phoityne, @pieandcakes, @ptrthomas, @raix, @richterger, @rkeithhill, @rebornix, @roblourens, @svaarala, @testforstephen, @vadimcn, @vshaxe, @WebFreak001, @weinand, @yurydelendik |
@isidorn seems to work for me - I was able to resolve Dart-Code/Dart-Code#1990 with it. Thanks! |
This feature is great. Thank you soo much :) |
Since this can now be done by the debug extensions closing this. |
Steps to Reproduce:
No matter what I try, I cannot get the variable's value into clip board. I even tried a screen grab, but the hoover window disappeared. I remember this feature from visual studio years ago. It is quite useful.
The text was updated successfully, but these errors were encountered: