Closed
Description
Complexity: 4
Thanks to the C++ team (especially @yuehuang010, @xisui-MSFT) we've received PR #125737 which adds the frequently requested Disassembly View to VS Code.
The Disassembly View supports a single instance only and can be opened from an editor of an active debug session if the corresponding debug extension supports it. The view shows the disassembled source of the editor's content and supports instruction stepping and instruction breakpoints.
Today two debug extensions support the Disassembly View: "C++" and "Mock Debug" (shown in the following recording).
C++ setup
- Use one of the following links to setup VS Code for C++ coding:
- Step by Step CMake for Linux: https://code.visualstudio.com/docs/cpp/cmake-linux#_create-a-cmake-hello-world-project
- Walkthrough for Mac: https://medium.com/@sam.romano18/visual-studio-code-setup-for-beginners-using-c-and-cmake-e92ab4f1fba1
- Walkthrough for Windows: https://code.visualstudio.com/docs/cpp/config-msvc
- once you have the debugger running, have it hit a breakpoint
- right-Click in the source cpp and run the "Open Disassembly View" action from the context menu.
Mock Debug Setup
- install latest "Mock Debug" extension from the Marketplace.
- create a Markdown file "test.md" and copy the contents of this link into it.
- set a breakpoint in line 51
- from the editor's title area select the "Debug File" action from the drop down item:
- once you hit the breakpoint, run the "Open Disassembly View" action from the markdown editor's context menu.
What to test:
- Right Click menu in the editor should show "Open Disassembly View" only for supported debuggers in an active debug session.
- Disassembly View:
- Scrolling up and down should be smooth and infinite, text content should expand
- Current instruction marker (yellow left pointing arrow) should match with source code event while stepping.
- When disassembly view is in focus, stepping In/out/back will step individual instructions.
- Switch back to source code resume normal stepping behavior.
- Click on callstack should jump to that instruction address (if possible), when disassembly view is in focus.
- Add and Remove Instruction Breakpoints with the Disassembly View.
- Added breakpoints should appear in the Breakpoint View List.
- Remove instruction breakpoint or by breakpoint view list, both should update.
- Click on address should open to breakpoint.
- Instruction breakpoints should survive debug sessions (but not VS Code restarts).
Activity