Visual Studio 2005 Search Memory

I don't think it exists, but I will throw it away anyway. Is it possible to look up a value in memory during debugging?

For example, if I have a string "uniqueString" cached somewhere in memory, but I don’t know what variable it is stored under, can I do a search? Like in, find out which variable has "uniqueString" as its value?

This is for C # managed code.

+3
c # memory search visual-studio
source share
2 answers

windbg allows you to search directly. 's' is the command you are looking for, here is a very good cheat sheet . The sos extension also allows you to scan string objects in managed code, although the s command must also find them (must use a search in unicode format).

+3
source share

You have the same functionality in Visual Studio, accessible from the direct window. Although you will have to manually somehow limit the range of addresses to search (see the syntax in the link).

(edit) By the way, you can easily create dumps from VS too: Debug-> Save Dump As.

+2
source share

All Articles