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 json from variable WATCH #36704

Closed
dbauszus-glx opened this issue Oct 22, 2017 · 9 comments
Closed

Copy json from variable WATCH #36704

dbauszus-glx opened this issue Oct 22, 2017 · 9 comments
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *extension-candidate Issue identified as good extension implementation feature-request Request for new features or functionality
Milestone

Comments

@dbauszus-glx
Copy link

It should be possible to copy variable values or json from a watched variable during debug. This is the one feature which makes me still need to use WebStorm where it is easily possible to copy JSON from the right click menu on a watched variable.

image

Where as in Visual Studio Code there is merely the option to add / remove / edit a variable watch.

image

Please log this as a feature request.

@vscodebot vscodebot bot added the debug Debug viewlet, configurations, breakpoints, adapter issues label Oct 22, 2017
@isidorn
Copy link
Contributor

isidorn commented Oct 23, 2017

There is already copy value action but only for simple expressions which have a value.
There is no "Copy JSON" thus leaving this feature request open

screen shot 2017-10-23 at 11 07 53

@isidorn isidorn changed the title Copy value / json from variable WATCH Copy json from variable WATCH Oct 23, 2017
@isidorn isidorn added the feature-request Request for new features or functionality label Oct 23, 2017
@isidorn isidorn added this to the Backlog milestone Oct 23, 2017
@isidorn isidorn removed their assignment Oct 23, 2017
@dbauszus-glx
Copy link
Author

There is a limit of 10000 characters on watchers. In the case of the JSON it would be neat of the limit could be configured. My objects are almost always longer than 10k characters.

@ryanleecode
Copy link
Contributor

I wanna give this a shot but is there a way to test the debugger in incremental mode? The debugger for the OSS vscode only works when I use the vscode-[platform] command and run the exe.

@isidorn
Copy link
Contributor

isidorn commented Oct 25, 2017

@drdgvhbh please keep in mind that this feature request does not have a help wanted label, which means that we are not 100% sure we want this.
Keep in mind that vscode debugger ux is language agnostic and adding a Copy JSON commands sounds too specific for JavaScript. I understand that JSON is used for more than just js but still it feels to js specific for me.

As for running the debugger in incremantal vscode you can see it here #20623 (comment)

Sorry for missing documentation on this.
fyi @weinand we should probably add documention in 'How To Contribute' wiki on how to setup debugger for continuous development.

@weinand
Copy link
Contributor

weinand commented Oct 25, 2017

@drdgvhbh, @dbauszus-glx what exactly is the definition of "Copy JSON" for arbitrary languages, e.g. C++?

The Debug Adapter Protocol (DAP) does not provide this functionality directly, so the (generic) implementation of this feature would have to live in the VS Code UI. It would use the existing primitive DAP requests to retrieve names and values of data structures and construct a JSON from them. I don't know how useful this JSON is for C++ developers...

I suggest to implement this feature as an extension.
@isidorn is it already possible to contribute a context action on watches and variables?

@weinand weinand added the *extension-candidate Issue identified as good extension implementation label Oct 25, 2017
@isidorn
Copy link
Contributor

isidorn commented Oct 25, 2017

@weinand I also had the same idea to be implemented by the extension but I thought the extensions can not access the clipboard.

Currently it is not possible to contribute for watches and variables but simply because we did not enable this due to the lack of use case

@weinand
Copy link
Contributor

weinand commented Oct 25, 2017

copy to clipboard: see https://stackoverflow.com/questions/7778539/copy-to-clipboard-in-node-js

I've created feature request #36891

@dbauszus-glx
Copy link
Author

dbauszus-glx commented Oct 25, 2017

Copy value would do to keep the function language agnostic. At the moment it is not possible to copy values from anything but string and strings are limited at 10000 characters in the watcher.

image

I am sure that there is a use case for copying values without the requirement to change the code itself, i.e. to use stringify just for the sake of access to the value during debug.

@isidorn isidorn added *extension-candidate Issue identified as good extension implementation and removed *extension-candidate Issue identified as good extension implementation labels Nov 17, 2017
@vscodebot
Copy link

vscodebot bot commented Nov 17, 2017

This issue has been closed because it is not within the scope of the core product, but could be addressed by an extension. The VS Code Marketplace shows all existing extensions and you can get started writing your own extension in a few simple steps. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Nov 17, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *extension-candidate Issue identified as good extension implementation feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants