-
Notifications
You must be signed in to change notification settings - Fork 29.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roadmap: Disassembly View Feature #124163
Comments
@yuehuang010 thanks a lot for creating this issue After some discussions with my fellow colleagues it feels like the best path forward would be to implement a custom editor internally. This custom editor would listen to DAP requests and based on that show the appropriate data. A good example of a custom editor is the If we were to introduce a custom memory editor I think a good place for it to live would be under Maybe a Hex view could also be a good inspiration for a virtual editor. Though I know it is done from an extension. Maybe @lramos15 has a good pointer Once we figure out how and where to do this, we can discuss how exactly it would look and behave. Maybe we do a 30 min meeting some time start of next week? |
Maybe an easier example is to look at an existing readonly editor such as the "Runtime Extensions" editor: vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.ts Line 65 in 8c5490f
|
This |
I was playing around with HTML onscroll event. Adding more "lines" to the body will extend the text document, which indirectly un-bottom's scroll bar. This would give it an infinite scrolling feel. Flipping the logic upwards scrolling would work too.
|
Simply using an onscroll event would likely cause performance issue at some point. Scroll itself had never been an issue for us. Our major issues are the problems associated with scrolling, including but not limited to:
Using internal vs code stuff certainly helps us, as the main editor resolves these issues very well, but it does all the calculations based on line number. We need to settle a way to do layout without using line number. There are several possible ways, depending on how generic you would like this editor to be. |
@isidorn There are two routes you could go with a custom editor:
I suggest looking into a non-webview based custom editor first since that would let you use all of our internal classes, such as the You can also check in with @lramos15 about some of the challenges he faced implementing the hex editor, specifically some of the work he did so that the hex editor can display large files and smoothly scroll through them |
Yeah fyi @joaomoreno |
Yeah I don't know how we feel about a one off solution that belongs to an external extension living within VS Code core. Although the implementation details are a lot easier when having access to VS Code internals. Here are a few challenges I came across with the hex editor
Overall making a custom editor extension isn't easy and those were my main challenges. I'm not sure what the challenges would be for an internal custom editor. |
@mjbvz I'm not sure if we can use an custom editor. Two features are currently blocking us from using a custom editor:
Any suggestions? |
@xisui-MSFT custom editors do not have line numbers by themselves and can contain custom content. Just check out the "Runtime Extensions" editor. F1 > show running extensions. Looking again at your content it seems like the Table widget might be a better fit, since you have both rows and columns. If you think this approach makes sense or you would like to discuss it further with me feel free to schedule a 30min meeting with me. Just fyi I am in Europe, so something morning time Redmond would work best. |
Hello, Regards. |
@yannickowow you've already filed a feature request for |
@isidorn Is there an example using that table widget? I'm not sure how the selection works in it. Also, does it support tokenization & hover message for each token in it's content? We'll need to provide debugging info when hovering on some text like a register. |
@xisui-MSFT for example of a list widget powered view you can checkout the Debug Console (for example how selection behaves). The biggest problem with selection and virtual views is that it can not be multi page and that is a limitation that the debug console still has. You control the HTML rendering of each row, thus you can put any hover message you want. The table widget is used in the Keybindings Editor. Preferences > keyboard shortcuts Here's a code pointer https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts#L431 |
@isidorn Looks like selection in the output window works. How is it implemented? And is there any plan to improve selection experience in the debug console? Tokenization we need may not be as rich as the editor. The major scenario looks like this: |
@xisui-MSFT output window uses the Editor as the implementation detail. From the screenshot it is not 100% clear to me what is the tokenization scenario here. Is that a hover you are showing, or is it a small suggest box for the input? |
@isidorn When hovering on token "esp", the evaluation result is shown in the hover message. A list or table widget that looks similar to an editor sounds like a good idea. Can you schedule a meeting early next week for us to talk through this? You can invite me and I'll forward it to my colleagues. |
@xisui-MSFT I see. Well if you know the content of the cell, each cell could have a custom hover widget which on show would evaluate. I have sent out an invite for Tuesday, since Monday is a holiday in Switzerland. |
Good morning, |
@yannickowow currently no. Once we do we will assign it to a milestone so you can check that. |
Some code pointers: Debug console registering commands https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/debug/browser/repl.ts#L782 Debug console revealing last element Various templates that the debug console uses I am checking with Table widget owner Joao for the reveal middle element potential problems and will keep you up to date here. Let us know how it goes. |
I discussed with the Table widget owner Joao and the revealing of the middle table element should work nicely for your use case. So to recap you need a placeholder model with for example 500 elements, not all of them resolved. You should tell the tree to As for the tree reveal api it works like this:
So you probably need something like |
@isidorn Could you give some suggestions on the entry point? I could find examples for each feature we need but couldn't decide if there's a good way to combine them. Ideally, we need:
|
@isidorn Ping. |
@yuehuang010 Isidor is OOF and returns next Tuesday. |
Sorry for the slow response I was on vacation. @xisui-MSFT thanks for trying @yuehuang010 if I understand you correctly you want a special step command that is only active in the Dissassembly view.
As for the name of the view, I suggest to call it Assembly view. I did not hear any good arguments for the word dissasembly so far. Even the feature request in your repo first calls it assembly view microsoft/vscode-cpptools#206 |
(my two cents)
|
DAP request naming should not drive the UI and so far has not :) |
IMO, Assembly combines the assembly language into a binary. Disassembly
takes a binary and "disassembly" into assembly language. Our case is
closer to Disassemble.
I could see a future where we would have a special render for assembly
language. For example, files with .S extension.
…On Tue, Jun 22, 2021 at 10:55 AM Isidor Nikolic ***@***.***> wrote:
DAP request naming should not drive the UI and so far has not :)
The second argument makes sense. However I would still go for "assembly
view" for clarity.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#124163 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEXI5GP25ZGDLJYEX6AJ5L3TUDFADANCNFSM45EFFQ6A>
.
|
@isidorn, is there a unsetFocus()? Is there a way to clear the Context? |
@yuehuang010 can you please clarify? What focus would you like to unset? |
@isidorn, I am looking at EditorContextKeys.editorTextFocus as an example. Do you have another example of a Context? |
@yuehuang010 I believe @isidorn is referring to context keys which are state variables that can be referenced in package.json using the This is how we access it in extensions, but I would think that there is an API you can call directly when writing code within VS Code itself:
More info here: https://code.visualstudio.com/api/references/when-clause-contexts |
@bobbrow, we are under the hood, creating a new context key for the Disassembly View. |
Got it. I misunderstood. |
@yuehuang010 context keys should just work based on focus, you should not need to manualy set and unset them if they are only related to focus. |
Disassembly View Overview (Insiders) - PR #125737Check if debugger supports "supportsDisassembleRequest", then while debugging, right click on a source code to see "Open Disassembly View". A Disassembly View editor will appear with each line representing each instruction. In the Disassembly View, you can:Scroll up or down to see more instructions. Should be able to scroll without limit. Thanks. |
Nice! |
The initial insider is focused getting core functions up and running. Syntax color and Source code next on the todo list. |
Please find additional discussions in the associated PR. I've upgraded Mock Debug to support the "Disassembly View" feature: |
Could this extension add an address searcher like Visual Studio? |
Hi Team, C++ Extension is interested in developing an Disassembly View to represent the added interface in DAP (https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Disassemble). Below is a quick bullet points of the set of features we would like to see.
To contrast, Visual Studio Disassembly Window is shown in the screenshot below:
The view should include:
In additional to displaying the data, users could also interact with the view by:
Thank you.
The text was updated successfully, but these errors were encountered: