Closed jianguile closed 6 years ago
OpenDebugAD7 is currently not open sourced.
What features are you trying to add to the cpptools extension's debugging experience?
Some features which have been implemented in MIEngine,such as watch memory,watch register. But OpenDebugAD7 don't provide method to use these ability.
@jianguile Are you looking for a memory window ? MIEngine is also used in Visual Studio and that is why that code is there because Visual Studio has windows to display memory information, which VS Code does not.
@pieandcakes Thank you very much. That is exactly what I am looking for. It confused me for a long time that why opendebugad7 "hide" the ability. In the other word, it's very diffcult to use the features in vscode cpp tools extension. Is that understanding right? Of course, a new debug view should be added to vscode and drive opendebugAD7 to get information from gdb sub-process. I need a memory window and a register window to make debug more effective , will you have any suggestion ? Thanks again.
@WardenGnaw Is there any plan for opendebugad7 open source ? Or it will not happen?
@jianguile Currently there is no plan to open source OpenDebugAD7. OpenDebugAD7 isn't hiding any ability. If you need to add UI, that is done within VS Code's source and not ours. Once they have enabled it and added a way through the debug protocol to communicate it back to the UI, enabling it would be easy.
OpenDebugAD7 translates the items sent back from MIEngine into VSCode's debugging protocol messaging system so there won't be anything for you to implement there until that functionality is supported by VS Code. If VS Code doesn't implement the idea of memory window, we don't have any way of passing the information back to the UI.
@pieandcakes I don't think OpenDebugAD7 is completely transparent between vscode and MIEngine. Image what will happen to AD7 if vscode sends a "watch memory" command as a new feature, I get an "unrecognize request" when I try this. AD7 implements the interfaces defined in vscode debug protocol, so it doesn't work when only vscode has some new features which AD7 don't know. I haven't find any "common, general interface" to send some new command to MIEgnine. I tried anything and failed, then take another solution, crude but works. Wish vscode will upgrade soon, who don't want a memory view? especially in emmbeded device. Thank you for your time and the discussion.
VSCode currently has a form of UI extension through the TreeDataProvider class. Here is an example someone used to implement a Register List: https://github.com/Marus/cortex-debug. By open sourcing OpenDebugAD7, it should be possible to also add views like memory or disassembly instructions using the 'TextDocumentContentProvider' and by adding custom commands through calls to vscode.debug.activeDebugSession.customRequest.
@unknownv2 Oh ,I think AD7 don't support customRequest for now. Or I just don't get a right way to use it ?
It doesn't at the moment I don't believe, but if it is open sourced, then other people can add custom commands.
Like I said above, there isn't a plan to open source OpenDebugAD7. If there is a protocol change you would like us to support, please add an issue here with the protocol item and we can consider it.
Has it been open sourced here -- https://github.com/microsoft/MIEngine/tree/main/src/OpenDebugAD7? Or is it a different component with a similar name?
It is the same. OpenDebugAD7 has been open sourced as of 2018.
I want to add some feature to c++ debug extension--cpp tools, but can't get source code when vscode and MIEngine are avaliable. Where can I get source code ? Thanks a lot. By the way,I asked the same question in the vscode project, weinand reply that I should come here. As opendebugad7.exe works with MIEngine, maybe I should refer to MIEngine project ?