go-lang-plugin-org / go-lang-idea-plugin

Google Go language IDE built using the IntelliJ Platform
https://plugins.jetbrains.com/plugin/5047
Other
4.56k stars 570 forks source link

reflect.Value not shown when debugging #2347

Closed kolkov closed 8 years ago

kolkov commented 8 years ago
package main

import (
    "fmt"
    "github.com/go-ozzo/ozzo-config"
)

func main() {
    // create a Config object
    c := config.New()

    // load configuration from a JSON string
    c.LoadJSON([]byte(`{
        "Version": "2.0",
        "Author": {
            "Name": "Foo",
            "Email": "bar@example.com"
        }
    }`))

    // get the "Version" value, return "1.0" if it doesn't exist in the config
    version := c.GetString("Version", "1.0")

    var author struct {
        Name, Email string
    }
    // populate the author object from the "Author" configuration
    c.Configure(&author, "Author")

    fmt.Println(version)
    fmt.Println(author.Name)
    fmt.Println(author.Email)
    // Output:
    // 2.0
    // Foo
    // bar@example.com
}

image

ignatov commented 8 years ago

Please try the same with the console version, I suspect that it's the issue of Delve.

kolkov commented 8 years ago

How can I do this?

dlsniper commented 8 years ago

To me this looks like an issue in Delve, see below:

snapshot223

dlsniper commented 8 years ago

@kolkov the debugger that the plugin is using is Delve. You can find it here: https://github.com/derekparker/delve and you can see everything you need in the readme/wiki :)

kolkov commented 8 years ago

@dlsniper Where can I do this? In the IDEA Debugger console?

dlsniper commented 8 years ago

@kolkov you can do this in your normal console / command line of your operating system.

dlsniper commented 8 years ago

Or the builtin terminal of IDEA

kolkov commented 8 years ago

@dlsniper Thanks! I thought it was like in LiteIDE: image

dlsniper commented 8 years ago

Delve does not support this functionality yet, please see: https://github.com/derekparker/delve/issues/383 LiteIDE uses gdb as a debugging backend so a different story.

@ignatov I'd close this issue as we can't do too much for this for now (maybe just don't allow expanding of unsafe.Pointer type fields).

kolkov commented 8 years ago

@dlsniper Do I need to create issue in delve repo?

dlsniper commented 8 years ago

I've created the issue there. Thank you.