vscode-js-debug icon indicating copy to clipboard operation
vscode-js-debug copied to clipboard

Hovering over a node reference in JSDebug could highlight in the browser

Open bgoddar opened this issue 4 years ago • 4 comments

Is your feature request related to a problem? Please describe. Had a Devtools extension user request this, and I thought it could be a pretty cool addition. original thread below: https://github.com/microsoft/vscode-edge-devtools/issues/445

When debugging something related to DOM it is quite handy to know why element you currently have in your scope (in TS of JS file) Browser DevTools allows you to mouse over it and highlight in on the page. VSC DevTools do not. Same is true for the console in the browser and in vscode.

image

Would be great to have this feature in vs code.

Describe the feature you'd like A clear and concise description of what you want to happen.

bgoddar avatar Aug 19 '21 19:08 bgoddar

I think this is something that CDP could provide all the tools you need. Just a matter of resolving the object to a nodeId and then requesting the overlay to highlight it. I'd be happy to talk with you how the browser does this in case you want to do something similar

bgoddar avatar Aug 19 '21 19:08 bgoddar

Right now VS Code does not provide any way for the debugger to do this, we don't know when a node/variable is hovered

connor4312 avatar Aug 19 '21 19:08 connor4312

Ahh, gotcha. Thanks for the context on this. The hover functionality would need to be a vscode feature request then?

bgoddar avatar Aug 19 '21 19:08 bgoddar

Yea, that or DAP... I'm not sure what the API would look like

connor4312 avatar Aug 19 '21 19:08 connor4312