WinDbg command output to clipboard
Asked Answered
O

1

1

Is there any way to redirect a command output to clipboard in WinDbg similar to

<command> | clip
Oleneolenka answered 23/3, 2017 at 20:35 Comment(2)
Not aware of a way to do this. Closed you could get would be to use .logopen/.logappend/.logclose to save to file and paste from thereBukovina
Not tried it but I imagine that using cdb might work.Luxuriate
F
6

On Windows 10, clip is a built-in Windows command line executable to copy text into the clipboard. On other versions of Windows you might need to find a similar tool and install it somewhere in %PATH%.

You can use it from WinDbg with

.shell -ci "<command>" clip

e.g.

.shell -ci "k" clip

to copy the call stack to the clipboard.

There's also the undocumented !! abbreviation of .shell, so you can do

 !! -ci "k" clip

If you use a WinDbg startup script anyway, you can define an alias, e.g.

as | .shell -ci

and then do a very short

| "k" clip

Note that this redefines |, which shows the current process. I use that command at least once in every debugging session, so I don't recommend that. Maybe you find a better shortcut.

Flawed answered 24/3, 2017 at 10:13 Comment(1)
Omg! This is awesome! Thank you so much @Thomas ! :DOleneolenka

© 2022 - 2024 — McMap. All rights reserved.