Skip to content

feat(debug): add 'Copy All' action to Watch view context menu#307886

Open
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:feat/watch-copy-all-306116
Open

feat(debug): add 'Copy All' action to Watch view context menu#307886
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:feat/watch-copy-all-306116

Conversation

@yogeshwaran-c
Copy link
Copy Markdown
Contributor

Summary

Fixes #306116.

Adds a new Copy All context menu action to the Watch view that copies all watch expressions as `name: value` pairs, one per line.

Currently users can only copy individual watch expressions or values one at a time via the context menu. Selecting multiple rows with Ctrl+A and Copy only captures values (or a flat list), losing the Expression → Value mapping. This action makes it easy to export the entire Watch list with full context for debugging reports, issues, or chat messages.

Example output

```
user.name: "Alice"
user.age: 30
items.length: 5
```

Changes

  • `src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts` — new `CopyAllWatchExpressions` action registered under `MenuId.DebugWatchContext` in the `3_modification` group

Test plan

  • Start a debug session, add 2+ watch expressions with values
  • Right-click anywhere in the Watch view → Copy All
  • Paste into an editor — verify each watch appears as `name: value` on its own line
  • Verify the action is not shown / is disabled when no watches exist

🤖 Generated with Claude Code

Currently users can only copy individual watch expressions or values
one at a time via the context menu. Selecting multiple rows with
Ctrl+A and Copy only captures values (or a flat list), losing the
Expression → Value mapping.

This adds a new 'Copy All' context menu action that copies all watch
expressions as name: value pairs, one per line — ready to paste into
issues, chat messages, or notes when providing debugging context.

Fixes microsoft#306116

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "Copy All" or "Copy as Key-Value Pairs" to Watch Window

2 participants