skip to Main Content

When trying to do some simple debugging to better understand the code I’ve written, I tried to use the memory debugging tool however this option did not appear in the menu. I thought this was a pretty simple fix and googled it to no avail. This is odd as when I start debugging the program, the option actually appears. However, when I open "Memory 1" I get "Unavailable when debuggee is running." which is fair enough. Noted that I have ticked both options in Tools > Options (Enable address-level debugging & Show disassembly if source is not available). When I see screenshots of other people’s Visual Studio installations I see they have a much larger debug menu. I have attached some screenshots below of a dummy application I have made for demonstration.

I am using: Visual Studio Community 2022 (v.17.5.1)

Screenshot attachments below:

No memory option

Memory option appears when debugging

Can’t debug memory when debugging

Tools > Options

If you need anymore information just let me know.

3

Answers


  1. Chosen as BEST ANSWER

    For anyone looking for this in the future > You need to create a breakpoint in the code before you can view the memory (as explained in their comments). You can do this by clicking left of the line number in visual studio (a red dot or breakpoint will appear).


  2. I tried to use the memory debugging tool however this option did not
    appear in the menu

    It is by design. You can add memory debugging via Tools-> customize->Add Command-> Debug-> Memory1. But it is only available when debugging.

    enter image description here
    enter image description here

    Login or Signup to reply.
  3. I had the same problem, and I remember messing around with settings and the way to get it back is as follows:
    Tools -> Options -> Debugging -> General -> Enable address-level debugging (make sure its ticked)

    Then while in Debug go to Debug -> Windows and you should see Memory or just go to Command and type memory.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search