How do I dump out a string?

The topic came up a while back on one of our aliases – How can I dump out a string?

There are a lot of ways do this in the debugger and there are also debugger extensions that will help out with.  What most people in WinDBG do is us the “du” command for Unicode strings and “da” for ASCII strings. However this has a problem in that output looks like:

00000001`40234dd8 "Server=com-appdb-01\moss1;Databa"
00000001`40234e18 "se=SharedServices2_55;Trusted_Co"
00000001`40234e58 "nnection=yes;App=Windows SharePo"
00000001`40234e98 "int Services;Timeout=15"

You cannot easily cut and paste this into other places.  You have the addresses and such.  Also, this only handles a few lines.  If you check out the help for the du commands there is /c switch which says only dump the characters instead of all the characters.  You would end up with a command like - “du /c”.  To take it one step further you can actually create an alias:

as !ds du /c 100 c+

Then all you have to do is - !ds <address to String object>

So this combines both aliases and come special switches.



Comments (0)

Skip to main content