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

Support ability to jump to symbol definition from Variables and Watches views

Open sandipchitale opened this issue 6 years ago • 4 comments

  • VS Code Version: 1.32.1

Steps to reproduce:

  1. Debug and go to Variables or Watch window.
  2. The values and types for various objects are show.
  3. Hookup the type of the value to the Go to Symbol in Workspace (CTRL+T) of VS Code to be able to jump to the declaration.

image

Eclipse JDT debugger supports this for Java in Variables and Expressions (aka Watch) views - Open Actual Type

sandipchitale avatar Mar 13 '19 21:03 sandipchitale

Chrome devtools supports this. My request is to support this but in the context menu of value's type e.g. AppComponent -

image

sandipchitale avatar Mar 14 '19 04:03 sandipchitale

We would not be able to hook up "go to symbol" in general since as a debugger we have no such symbol registry. However, functions do give us that internal [[FunctionLocation]] which I can see would be useful to expose in the debugger.

connor4312 avatar Nov 03 '20 19:11 connor4312

For https://github.com/microsoft/vscode-js-debug/issues/838#issue-735587588 wont the Source map help in any way?

sandipchitale avatar Jan 26 '23 02:01 sandipchitale

Not really, since sourcemaps don't tell us where any given symbol is declared, they just map locations to other locations.

I realized we probably need a DAP feature for this, so opened https://github.com/microsoft/debug-adapter-protocol/issues/368

connor4312 avatar Jan 26 '23 17:01 connor4312

Related: https://code.visualstudio.com/updates/v1_93#_jump-to-variable-definition and https://code.visualstudio.com/updates/v1_93#_debug-adapter-protocol

starball5 avatar Sep 08 '24 22:09 starball5

Ah, yes, thanks for the ping. This would be covered by https://github.com/microsoft/vscode-js-debug/pull/2056

connor4312 avatar Sep 08 '24 23:09 connor4312