Is it possible to watch the value of a memory location using the Visual Studio Debugger's Watch window?

前端 未结 2 1520
旧巷少年郎
旧巷少年郎 2021-02-01 17:26

Yes, I know there are four Memory windows, but I much prefer the display of a single value in the watch window, and I\'m wondering if it\'s possible to specify a memory location

2条回答
  •  猫巷女王i
    2021-02-01 18:10

    If you want to watch a particular memory location then you need to tell the debugger the type of the object that lives in that location. Instead of just 0x00aabbcc use (SomeType*)0x00aabbcc. Once the debugger knows the type of the memory location it will treat it just like a typed local and display values accordingly

提交回复
热议问题