Skip to content
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

Data type in debugger watch list hides variable value #2569

Open
ardnew opened this issue Dec 13, 2022 · 1 comment
Open

Data type in debugger watch list hides variable value #2569

ardnew opened this issue Dec 13, 2022 · 1 comment
Labels
debug/variables issues related to variables inspection/presentation Debug Issues related to the debugging functionality of the extension.

Comments

@ardnew
Copy link

ardnew commented Dec 13, 2022

code-watch-values
Issue Type: Bug

When halting any Go program under debugger dlv, the Variables and Watch panes in the Run and Debug panel show variables using their full, absolute type preceding its current value. With many nested packages, it makes values hard to see without expanding each individually.

You can see in the attached screenshot that the entire Variables list is useless – it redundantly shows only the path prefix for local types defined in the current package being debugged.

Is there any way to define the formatting for the watch/local variables? Or is there a way to modify how it shows the type?
For example, the language server gopls has a configuration option that narrows type paths:

  "gopls": {
    "formatting.local": "github.com/ardnew"
	// Project-specific settings.json can narrow the scope further, e.g.:
    //"formatting.local": "github.com/ardnew/bases"
  }

If the debugger can refer to that, great; otherwise, could a similar option in the Go extension's settings be added to copy this behavior?

Extension version: 0.36.0
VS Code version: Code 1.67.1 (Universal) (da15b6fd3ef856477bf6f4fb29ba1b7af717770d, 2022-05-06T12:37:16.526Z)
OS version: Darwin x64 21.6.0
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2800)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 16.00GB (0.77GB free)
Process Argv . --crash-reporter-id d1db2c30-84ae-4a50-be0a-79d992e054e5
Screen Reader no
VM 0%
@gopherbot gopherbot added this to the Untriaged milestone Dec 13, 2022
@findleyr findleyr added the Debug Issues related to the debugging functionality of the extension. label Dec 14, 2022
@findleyr
Copy link
Member

CC @suzmue @hyangah -- is there any way to improve this UX? Can we use a package-local qualifier, rather than fully-qualified symbols?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug/variables issues related to variables inspection/presentation Debug Issues related to the debugging functionality of the extension.
Projects
None yet
Development

No branches or pull requests

4 participants