Closed omcnoe closed 4 years ago
I try to use vscode, the same issue.
By wireshark, the "Expre" is "*(*\"struct { MyField string \"json:\\\"field\\\"\" }\")(824633786848)"
The I use goland
, the result is ok.
By wireshark, the "Expr" is "Expr":"*(*\"struct { MyField string \\\"json:\\\\\\\"field\\\\\\\"\\\" }\")(824633786848)"
Use dlv --headless
.
If I input p *(*"struct { MyField string \"json:\\\"field\\\"\" }")(824633786848)
, the result is ok.
By wireshark, the "Expr" is "*(*\"struct { MyField string \\\"json:\\\\\\\"field\\\\\\\"\\\" }\")(824633786848)"
Obviously escape character
.Maybe the plugin in vsocde can't handle the situation, not bug in area/proc
?
Based on @chainhelen comment this seems like an issue with VSCode encoding.
What version of Delve are you using (
dlv version
)? Delve Debugger Version: 1.3.2 Build: $Id: 569ccbd514fc47c8b4c521b142556867ec5e6917 $What version of Go are you using? (
go version
)? go version go1.13.4 windows/amd64What operating system and processor architecture are you using? windows/amd64
With the following code, try to inspect the value of the BrokenInner slice in in VSCode. It will fail & print an error message on the debug console. As far as I can tell this only happens when inspecting a slice of an anonymous struct with a tagged field. Doesn't happen if you move the slice outside the struct.
When I inspect the value in the VSCode debugger, I get this in console: