0
IntelliJ IDEA、go1.4、Ideaのプラグインをインストールします。今私はGOコードを実行することができますが、デバッガを使用することはできません。 デバッガがIntelliJ IDEAの "Go"プラグインで動作しない
は、デバッグした後、私は
panic: <nil> not an Int
goroutine 68 [running]:
go/constant.Int64Val(0x0, 0x0, 0x2, 0xc8200d5180)
/usr/local/go/src/go/constant/value.go:236 +0x338
github.com/derekparker/delve/proc.(*Variable).parseG(0xc8200a6700, 0xc8200a6700, 0x0, 0x0)
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/proc/variables.go:387 +0x734
github.com/derekparker/delve/proc.(*Thread).GetG(0xc8200e4690, 0xc8200e4690, 0x0, 0x0)
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/proc/threads.go:295 +0x69
github.com/derekparker/delve/proc.(*Thread).SetCurrentBreakpoint(0xc8200e4690, 0x0, 0x0)
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/proc/threads.go:352 +0x18e
github.com/derekparker/delve/proc.(*Process).setCurrentBreakpoints(0xc820116100, 0xc8200e4690, 0x0, 0x0)
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/proc/proc_linux.go:413 +0x9b
github.com/derekparker/delve/proc.(*Process).Continue(0xc820116100, 0x0, 0x0)
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/proc/proc.go:311 +0x214
github.com/derekparker/delve/service/debugger.(*Debugger).Command(0xc82010a720, 0xc82010a8a0, 0x0, 0x0, 0x0)
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/service/debugger/debugger.go:394 +0x847
github.com/derekparker/delve/service/rpc1.(*RPCServer).Command(0xc82081c140, 0xc82010a8a0, 0x7f86a9daaa38, 0xc820114300)
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/service/rpc1/server.go:52 +0x2f
reflect.Value.call(0x945540, 0xa69c40, 0x13, 0xa84850, 0x4, 0xc820080280, 0x3, 0x3, 0x0, 0x0, ...)
/usr/local/go/src/reflect/value.go:432 +0x120a
reflect.Value.Call(0x945540, 0xa69c40, 0x13, 0xc820080280, 0x3, 0x3, 0x0, 0x0, 0x0)
/usr/local/go/src/reflect/value.go:300 +0xb1
created by github.com/derekparker/delve/service/rpccommon.(*ServerImpl).serveJSONCodec
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/service/rpccommon/server.go:298 +0xf70
goroutine 1 [chan receive]:
github.com/derekparker/delve/cmd/dlv/cmds.execute(0x0, 0xc8201143c0, 0x1, 0x4, 0xc82010e038, 0x0, 0x0)
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/cmd/dlv/cmds/commands.go:428 +0xad5
github.com/derekparker/delve/cmd/dlv/cmds.New.func4(0xc820120c00, 0xc8201143c0, 0x1, 0x4)
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/cmd/dlv/cmds/commands.go:154 +0x53
github.com/derekparker/delve/vendor/github.com/spf13/cobra.(*Command).execute(0xc820120c00, 0xc8201142c0, 0x4, 0x4, 0x0, 0x0)
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/vendor/github.com/spf13/cobra/command.go:569 +0x869
github.com/derekparker/delve/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc820120400, 0xc820120c00, 0x0, 0x0)
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/vendor/github.com/spf13/cobra/command.go:656 +0x56b
github.com/derekparker/delve/vendor/github.com/spf13/cobra.(*Command).Execute(0xc820120400, 0x0, 0x0)
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/vendor/github.com/spf13/cobra/command.go:615 +0x2d
main.main()
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/cmd/dlv/main.go:13 +0x4a
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1696 +0x1
goroutine 5 [syscall]:
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
/usr/local/go/src/os/signal/signal_unix.go:28 +0x37
goroutine 18 [chan receive, locked to thread]:
github.com/derekparker/delve/proc.(*Process).handlePtraceFuncs(0xc820116100)
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/proc/proc.go:774 +0xc3
created by github.com/derekparker/delve/proc.New
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/proc/proc.go:82 +0x1d0
goroutine 67 [IO wait]:
net.runtime_pollWait(0x7f86b0656290, 0x72, 0xc8200181c0)
/usr/local/go/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc82012a290, 0x72, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc82012a290, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).Read(0xc82012a230, 0xc82032c000, 0x200, 0x200, 0x0, 0x7f86b1e98050, 0xc8200181c0)
/usr/local/go/src/net/fd_unix.go:232 +0x23a
net.(*conn).Read(0xc82055a000, 0xc82032c000, 0x200, 0x200, 0x0, 0x0, 0x0)
/usr/local/go/src/net/net.go:172 +0xe4
encoding/json.(*Decoder).refill(0xc820132000, 0x0, 0x0)
/usr/local/go/src/encoding/json/stream.go:152 +0x287
encoding/json.(*Decoder).readValue(0xc820132000, 0x1, 0x0, 0x0)
/usr/local/go/src/encoding/json/stream.go:128 +0x41b
encoding/json.(*Decoder).Decode(0xc820132000, 0x99b9a0, 0xc82012e080, 0x0, 0x0)
/usr/local/go/src/encoding/json/stream.go:57 +0x159
net/rpc/jsonrpc.(*serverCodec).ReadRequestHeader(0xc82012e060, 0xc82010a100, 0x0, 0x0)
/usr/local/go/src/net/rpc/jsonrpc/server.go:66 +0x7c
github.com/derekparker/delve/service/rpccommon.(*ServerImpl).serveJSONCodec(0xc8201124b0, 0x7f86a9daa698, 0xc82055a000)
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/service/rpccommon/server.go:252 +0x3ec
created by github.com/derekparker/delve/service/rpccommon.(*ServerImpl).Run.func1
/opt/buildAgent/work/b97f8195591f35ac/gopath/src/github.com/derekparker/delve/service/rpccommon/server.go:145 +0x185
goroutine 15 [select, locked to thread]:
runtime.gopark(0xb97eb0, 0xc82051af28, 0xa8d4a0, 0x6, 0x42bf18, 0x2)
/usr/local/go/src/runtime/proc.go:185 +0x163
runtime.selectgoImpl(0xc82051af28, 0x0, 0x18)
/usr/local/go/src/runtime/select.go:392 +0xa64
runtime.selectgo(0xc82051af28)
/usr/local/go/src/runtime/select.go:212 +0x12
runtime.ensureSigM.func1()
/usr/local/go/src/runtime/signal1_unix.go:227 +0x353
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1696 +0x1
私は、コードを実行することができ、それが動作し、コンソールにエラーが表示されます。ブレークポイントなしでデバッグすることができます(おそらくその実行モード)コード内の最初のブレークポイントでBun - コンソールのエラー。 This質問は現実にはなりません。