-
Notifications
You must be signed in to change notification settings - Fork 645
Debugging: Map keys/values are shown in array syntax as alternating elements #1384
Comments
Can you share a sample code that I can use to see what's going on? |
Not at the moment, it's proprietary code. I'll keep my eyes open for a repro I can post here. |
As asked, below is a sample code where this problem occurs.
|
@vanhumbeecka This program seems to be expecting some input. Can you share the debug config that you are using? |
|
Thanks for the sample code @Rakhmanov This seems to be an issue with how delve sends data to the debug adapter in the Go extension. If you add The request for ListLocalVars returns an object |
I have logged upstream issue https://github.com/derekparker/delve/issues/1115 |
@ramya-rao-a |
I agree with @Rakhmanov, as long as we have the type info all maps could be handled in a different way rather than the same way in which arrays/slices are transformed Extracting the GoReflectKind.Map case and chaging the variable traversal accordingly should do the trick right? |
@ramya-rao-a I was about to give this issue a try locally and I see you already implemented the fix Thanks for the celerity |
Thanks to your pointer in #1384 (comment) I realized this was an easy fix :) Others, |
Thanks!
…On Tue, Feb 20, 2018 at 2:18 PM Ramya Rao ***@***.***> wrote:
Closed #1384 <#1384>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1384 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAD5VjINiyIeFAzkxhmsA-r_nWgffGpnks5tW0TQgaJpZM4Qv8Sj>
.
|
Example:
For something like a large
map[interface{}]interface{}
, it can be difficult to see at a glance which elements are keys and which are values. Perhaps there's a way to number the key/value pairs, and display the key and value for each pair on their own adjacent lines?The text was updated successfully, but these errors were encountered: