Being able to view assembly and step through assembly instructions would be useful. Especially when debug information isn't available for a certain library. Right now it just displays a message saying unknown source, when it goes into one of these functions. Being able to view values of registers in the GUI some way. Not entirely sure how that would work with VSCode, but being able to the registers all the time and able to modify them such other assembly debuggers.
@marktrz if you're on Linux, nemiver does it all and is quite a performer. I'm using it as an alternative to vs debugger on linux and so far it performs well. Now only if vscode could implement its features 馃帎
Thanks for the feedback. You can view disassembly in vscode using the -exec disassembly command in the debug console. Registers can be viewed the same way (-exec info registers).
I have code in C which calls code in ASM and it would be very useful to debug the ASM code within vs code without calling specific gdb commands which only show part of the source.
A register display would be very useful in situations like this, having it update as you step around.
If I'm not mistaken, since it's been a couple of years since I used it, the sublime gdb plugin for sublime text 2 supported asm debugging, showing registers and everything (https://github.com/quarnster/SublimeGDB). Probably there is a way for it to be done on vs code
So, could you please add a disassembler viewer in dubug view. It will be so helpful for C/C++ developers.
It should not take long time to implement this.
Below placed examples how this view looks like:


Please add
ASM window
Memory window
Register window
I have just spent days looking for alternatives to VSCode because I would like to have assembler, memory and register windows. Reworking a large open source project based on VSCode/CMmake to a new tool is considerable effort. There are many people asking for a memory view for a long time. Please do consider adding such a window. Memory view can execute the GDB x command after each step / trace as it is so last decade to enter that command repeatedly (or up arrow enter). Ideally the window would also highlight values that have changed.
@doingnz You could try using Visual Studio 2017 -- they have some remote to Linux ability: https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-development/ .
Please add
ASM window
Memory window
Register window
This is probably related to https://github.com/Microsoft/vscode-cpptools/issues/941
Has this been implemented yet???
No, but I think that they would happily accept a PR.
Oh I am sure they would. PlatformIO has implemented this a long time ago.
What's the hold up?
What's the hold up? Nothing about it in new insider build. @sean-mcmanus
@optomux
Not that I think that this feature is not needed, but I guess that's not top priority here. Just wait patiently or do it yourself. You can always copy appropriate code from PlatformIO to this extension and submit a pull request.
I wish someone made an extension for it. Would PlatformIO work with this?
@optomux I don't work on the debugger stuff at all. The other debugger people spend most of their time working on the Visual Studio debugger (a paid product, although there are some free versions with restricted licenses). Implementing an assembler view or other advanced debugging features isn't a priority for the debugger team and not on their schedule to implement.
@sean-mcmanus Hi!
If you could give a few pointers of example code to have an idea of how vs code interacts with gdb, sends commands, and sets the UI, I would be willing to try to implement this.
@Izikiel Ask @WardenGnaw (or @pieandcakes when he gets back from vacation in January). I don't know much about how the debugger works since I just work on the language service stuff. I think most of it is open source. Another repo that may be relevant is https://github.com/Microsoft/MIEngine .
I tried debugging in VSCode extension PlatformIO on my embedded device. Nice, it's possible to switch fluently between debugging of C source and disassembly view.
It would be great to have such possibility with desktop apps as well.
Please add
ASM window
Memory window
Register window
@jacdavis How does "-exec disassembly" work? While debugging, I type "-exec disassembly" + RETURN in the DEBUG CONSOLE window, but receive only "identifier "exec" is undefined".
@pkeir which debug "type" are you using? that command works for gdb.
Thanks for the feedback. You can view disassembly in vscode using the -exec disassembly command in the debug console. Registers can be viewed the same way (-exec info registers).
-exec disassembly
Undefined command: "disassembly". Try "help".
help
-var-create: unable to create variable object
@liar666 -exec disassemble or -exec disas works for me.
I'm running VSCode 1.44.2, ms-vscode.cpptools 0.27.0, gdb 9.1
-exec disassembleor-exec disasworks for me.
At least with set disassembly-flavor intel 馃槈
For the record the feature _is_ in the DAP by now microsoft/debug-adapter-protocol#50, microsoft/debug-adapter-protocol#49
More information is in https://github.com/microsoft/MIEngine/issues/816#issuecomment-661936509.
It is implemented for embedded use-cases in PlatformIO and https://github.com/Marus/cortex-debug.
For desktop applications it would be also useful whenever you don't have source code, see #811.
Edit: It is also implemented in https://github.com/vadimcn/vscode-lldb/blob/master/MANUAL.md#disassembly-view
+1 for this
I would like to know, in order to do it properly, VS Code needs to provide an UI for Assembly, same as Source View, to provide at the same time SteppingGranularity for the "Next Request", and supports for instructionBreakpoints.
Or is it a work to provide in DebugAdapter side, like CppTools.
For general purpose use (arbitrary address ranges) DisassembleRequest would need to be implemented in the adapter similar to https://github.com/microsoft/MIEngine/compare/dev/waan/readMemory.
This isn't implemented in vscode though and seems quite useless.
The important use-case is covered by https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Source (vscode implementation.
If there is no source code available you simply send an assembly document like this. They defined a custom language but I'd rather reuse something like https://marketplace.visualstudio.com/items?itemName=maziac.asm-code-lens.
Then you need to handle stepping, goto, breakpoints and stacktraces.
See disassembly references in https://github.com/vadimcn/vscode-lldb/blob/master/adapter/src/debug_session.rs.
All of this probably goes into MIEngine.
+1 for this
+1 for this
Most helpful comment
So, could you please add a disassembler viewer in dubug view. It will be so helpful for C/C++ developers.
It should not take long time to implement this.
Below placed examples how this view looks like: