Repository navigation
Test Disassembly view #129161
Copy link
Copy link
Closed
Labels
debugDebug viewlet, configurations, breakpoints, adapter issuesDebug viewlet, configurations, breakpoints, adapter issuestestplan-item
Milestone
Description
- anyOS Logan Ramos (@lramos15)
- anyOS: Isidor Nikolic (@isidorn)
Complexity: 4
Thanks to the C++ team (especially Yue (Felix) Huang (@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).
Reference Links
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
debugDebug viewlet, configurations, breakpoints, adapter issuesDebug viewlet, configurations, breakpoints, adapter issuestestplan-item

Activity
weinand commentedon Jul 26, 2021
Yue (Felix) Huang (@yuehuang010), xisui-MSFT please let me know if my editing has resulted in omissions or errors that needs to be fixed.
isidorn commentedon Jul 27, 2021
Yue (Felix) Huang (@yuehuang010), xisui-MSFT I have created some issues and have pinged you all on those issues.
For fixing them feel free to create a PR per issue and ping me on the PR, that way the review process will be easier.
I think none of the issues are super critical, but we should address all of them in order to get this view to production quality.
Thanks a lot!
isidorn commentedon Jul 27, 2021
Yanis HAMITI (@yannickowow) vadimcn Trass3r feedback is very welcome if you got a chance to try the disassembly view out. Thanks a lot!
yannickowow commentedon Jul 27, 2021
Hi, first of all, thanks for your work!
Unfortunately, I will not be able to test this feature using my extension since I finished my apprenticeship. These observations are done using C/C++ Extensions.
What I've encountered currently is:
condition/hitConditionupdatescallStack(should be yellow in first and then green for others)Command Paletteor directly from theCall Stack(if needed ?) [you figured it out and opened an issue]disabledin glyph margin from the Disassembly ViewSuggestions
step instruction? If not, we might override the current stepping icon to describe as an instruction stepinstructionReference, this will allowSource Breakpointsto be linked directly in the Assembly View.Trass3r commentedon Jul 27, 2021
It doesn't work at all for me on a simple WSL2 hello world CMake project.
So somewhere in
HandleDisassembleRequestAsyncaNotImplementedExceptiongets thrown.isidorn commentedon Jul 27, 2021
Yanis HAMITI (@yannickowow) thanks a lot for your help, really appreciate it. Out of your findings:
This is a fair feature request, but I would not add it yet. Too advanced IMHO and can be later added
Good catch. Created #129574
This is captured via #129540
Created #129571
Can you please create an issue in the C++ repo? This works for mock debug
Created #129572
Trass3r that sounds like a C++ issue. Can you please open a new issue in this repo https://github.com/microsoft/vscode-cpptools
Trass3r commentedon Jul 27, 2021
It works with my
mainbuild so let's wait for the next release.Just the performance is very bad when single stepping.
yannickowow commentedon Jul 27, 2021
I did some retries using disassembly and source and yeah, it toggles the
instruction granularity, all fine 👍.It looks more like an issue with C/C++.
Trass3r It looks like the issue is coming from C/C++ Extension.
Here is an example, when I use a Step Into command from Disassembly View:
I think, in this case, that you should use
-exec-step-instructioninstead.Trass3r commentedon Jul 27, 2021
Ah yes my step granularity PR has only recently been merged.
yuehuang010 commentedon Jul 28, 2021
FYI.