You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support context menu action contributions for debug viewlet views #15657
fyi roblourens now we support for extensions to contribute context menu items for debug views. For the moment we only support it for the call stack view but this can easily change
From your extension under package.json you can as before contribute "menus", but we introduced a new context called "debug/callstack/context". Under there you can specify a custom command which you want to be added to the debug callstack context menu.
Once executed the command gets the stackFrame internal uri as an argument from which the extension should be able to identify the stack frame.
Try to connect all the dots and if you have issues I can implement this tomorrow in the mock debugger as a template.
Andre Weinand (@weinand) it would be cool if you implemented restart frame using a similar approach and we get rid of the capability
Sure, for blackbox scripts this was going to be for next milestone though right? Since we need to communicate between the extension host and debug adapter.
roblourens yes, we will not ship the skipFiles UI for this milestone. But we can experiment with the necessary implementation details...
Isidor Nikolic (@isidorn) Yes, if we have a richer debug model available to extensions, and if we can communicate to the debug adapter from an extension, it would be possible to implement "Restart Frame" in an extension.
However, we will not do this for these reasons:
we cannot remove existing debug UI because it will cripple existing extensions.
if we would move more functionality into the extension (as private features), we would make it harder for other frontends (e.g. VS) to support this functionality.
Isidor Nikolic (@isidorn) I would like to implement an extension that runs alongside the "Native Debug" extension that would allow the user to right click on a variable in the debug view for a context menu with a custom button. In my application, the custom button would be "View Image" for an OpenCV Mat C++ object, so I would need the variable info passed along to the context menu action (and possibly be able to hide the button in case it's not a Mat object) so I can use that to draw in an HTML preview window. Will this be available to extensions?
Cody Rigney (@cmrigney) yes, we are planning to support this scenario. But we still have to design the debug object model that needs to be surfaced when passing the selection (e.g. the variable) to the context menu action.
Activity
isidorn commentedon Nov 17, 2016
Andre Weinand (@weinand) did you sync with Johannes Rieken (@jrieken) on this?
isidorn commentedon Nov 29, 2016
fyi roblourens now we support for extensions to contribute context menu items for debug views. For the moment we only support it for the call stack view but this can easily change
From your extension under package.json you can as before contribute "menus", but we introduced a new context called "debug/callstack/context". Under there you can specify a custom command which you want to be added to the debug callstack context menu.
Once executed the command gets the stackFrame internal uri as an argument from which the extension should be able to identify the stack frame.
Try to connect all the dots and if you have issues I can implement this tomorrow in the mock debugger as a template.
Andre Weinand (@weinand) it would be cool if you implemented restart frame using a similar approach and we get rid of the capability
roblourens commentedon Nov 29, 2016
Sure, for blackbox scripts this was going to be for next milestone though right? Since we need to communicate between the extension host and debug adapter.
weinand commentedon Nov 29, 2016
roblourens yes, we will not ship the skipFiles UI for this milestone. But we can experiment with the necessary implementation details...
Isidor Nikolic (@isidorn) Yes, if we have a richer debug model available to extensions, and if we can communicate to the debug adapter from an extension, it would be possible to implement "Restart Frame" in an extension.
However, we will not do this for these reasons:
cmrigney commentedon Nov 30, 2016
Isidor Nikolic (@isidorn) I would like to implement an extension that runs alongside the "Native Debug" extension that would allow the user to right click on a variable in the debug view for a context menu with a custom button. In my application, the custom button would be "View Image" for an OpenCV Mat C++ object, so I would need the variable info passed along to the context menu action (and possibly be able to hide the button in case it's not a Mat object) so I can use that to draw in an HTML preview window. Will this be available to extensions?
weinand commentedon Nov 30, 2016
Cody Rigney (@cmrigney) yes, we are planning to support this scenario. But we still have to design the debug object model that needs to be surfaced when passing the selection (e.g. the variable) to the context menu action.
cmrigney commentedon Nov 30, 2016
Andre Weinand (@weinand) Great thanks. Any idea if this will be in the next release?
weinand commentedon Nov 30, 2016
Cody Rigney (@cmrigney) not in the November release, but in the following.
jrieken commentedon Dec 1, 2016
Andre Weinand (@weinand) Can you guys also update the doc here: http://code.visualstudio.com/docs/extensionAPI/extension-points#_contributesmenus
weinand commentedon Dec 1, 2016
Johannes Rieken (@jrieken) thanks for the doc pointer. We will update as soon as these APIs become official.
weinand commentedon Dec 5, 2016
This was exploratory work for November. Will be tested in January milestone.
CangHaiQingYue commentedon Sep 27, 2017
How to configure opencv? Is there have any link?
cmrigney commentedon Sep 27, 2017
CangHaiQingYue I'm no longer working with OpenCV, so I didn't develop any extension for it. Not sure if anyone else did.
CangHaiQingYue commentedon Oct 11, 2017
Cody Rigney (@cmrigney) Ok thanks!
Support context menu action contributions for debug viewlet views