Invoking the debugger via code lens results in expanded slices showing only data_ptr and length fields, and expanding data_ptr shows only the element at index 0. I found the following vscode configuration elsewhere:
(setf lsp-rust-analyzer-debug-lens-extra-dap-args
'(:MIMode "gdb" :miDebuggerPath "rust-gdb" :stopAtEntry t :externalConsole :json-false :setupCommands
[#s(hash-table size 12 data
("description" "Enable pretty-printing for gdb" "text" "-enable-pretty-printing" "ignoreFailures" t))]))
and it fixed my problem. Due to the immense usefulnes of locals, I believe this deserves at least a mention in the docs, if not an outright change of defaults.
Invoking the debugger via code lens results in expanded slices showing only
data_ptr
andlength
fields, and expandingdata_ptr
shows only the element at index0
. I found the following vscode configuration elsewhere:then tried to adapt it to
dap-mode
:and it fixed my problem. Due to the immense usefulnes of locals, I believe this deserves at least a mention in the docs, if not an outright change of defaults.