I want to drag and drop value of a variable from debug watch window in VSCode. Instead,…
- User
I want to drag and drop value of a variable from debug watch window in VSCode. Instead, the variable name is dropped. Is there a way to drop the value instead?
- Assistant
Currently, Visual Studio Code's default behavior when dragging and dropping from the Debug Watch window inserts the variable name into the editor, not its value. There isn't a built-in way to change this drag-and-drop functionality to drop the variable's value instead.
However, you can achieve your goal by using the Copy Value option:
- Right-click on the variable in the Watch window.
- Select Copy Value from the context menu.
- Paste the value where you need it in your editor or elsewhere.
This method allows you to transfer the variable's value without manually typing it out.
If this is a feature you'd like to see implemented directly into VS Code's drag-and-drop functionality, consider submitting a feature request on the VS Code GitHub repository. The development team actively reviews user feedback for potential updates.