-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Introduce an inline
group to debug/callstack/context
#95887
Comments
As mentioned in the ref issue: To start we will only support this on the debug session elements. As the context when the contributed action is triggered on the session we would pass the session id to the extension. You can use the id to match the session, the only problem is that there is no API to get all sessions so you would have to store the session which you create, or to simply listen to our session creation events and store them. |
That's fine for me, js-debug already tracks its sessions for a range of existing functionality. |
I pushed a change to support this. Please note the following: all contributed actions will be shown at the start of the toolbar (as you designed in the original issue). If we want to support ordering we can do that but would require more refactoring. |
We should not forget to mention this in the release notes as it is a new contribution point! |
@isidorn I tried this and the button was there but the icon was not show (I could see the tooltip when I hovered where I should have been, I was able to click it). Both using a codicon and a local svg. These were the two commands I tried: https://github.com/microsoft/vscode-js-debug/blob/882634f32da2d7311bfb710f04eeded5638b011f/src/build/generate-contributions.ts#L963-L974 As: {
"command": "extension.NAMESPACE(node-debug).startProfile",
"group": "inline",
"when": " !jsDebugIsProfiling"
},
{
"command": "extension.NAMESPACE(node-debug).stopProfile",
"group": "inline",
"when": " jsDebugIsProfiling"
} (I will add extra parts to the Also, it looks like the menu items aren't updated when the context keys change, the same bug we had with the debug toolbar earlier. |
@connor4312 thanks for trying it out! |
Ok I looked into it and could not figure it out.
|
needs more context. @connor4312 refers to commands defined inside code which puzzles me. This should only work when defining commands inside package.json. For the tweak Idk if there is anything special, check if SCM is doing anything different? |
Ok I this required some hard core digging to Moria to figure out that I need to have a So this should now work nicely. @connor4312 please try it out. Thanks |
we automate some of the js-debug package.json generation. Saves repetition since many options are shared between debug types, and lets us type-check to contributions to ensure that e.g. all options are documented and all strings are localized.
Validated out of sources, works beautifully, thanks! |
Refs: #94812
Extensions should be able to contribute actions to be shown inline in items within the call stack view.
The text was updated successfully, but these errors were encountered: