1
0
mirror of https://github.com/beego/bee.git synced 2024-11-21 18:40:54 +00:00

Fix delve funcs

This commit is contained in:
MZI 2018-10-13 21:46:20 +08:00
parent db6c162b03
commit 2ef722e758
No known key found for this signature in database
GPG Key ID: 97BE7A905A0DA326
2 changed files with 4 additions and 3 deletions

View File

@ -20,6 +20,7 @@ import (
_ "github.com/beego/bee/cmd/commands/api" _ "github.com/beego/bee/cmd/commands/api"
_ "github.com/beego/bee/cmd/commands/bale" _ "github.com/beego/bee/cmd/commands/bale"
_ "github.com/beego/bee/cmd/commands/beefix" _ "github.com/beego/bee/cmd/commands/beefix"
_ "github.com/beego/bee/cmd/commands/dlv"
_ "github.com/beego/bee/cmd/commands/dockerize" _ "github.com/beego/bee/cmd/commands/dockerize"
_ "github.com/beego/bee/cmd/commands/generate" _ "github.com/beego/bee/cmd/commands/generate"
_ "github.com/beego/bee/cmd/commands/hprose" _ "github.com/beego/bee/cmd/commands/hprose"

View File

@ -28,10 +28,10 @@ import (
"github.com/beego/bee/cmd/commands/version" "github.com/beego/bee/cmd/commands/version"
beeLogger "github.com/beego/bee/logger" beeLogger "github.com/beego/bee/logger"
"github.com/beego/bee/utils" "github.com/beego/bee/utils"
"github.com/derekparker/delve/pkg/terminal"
"github.com/derekparker/delve/service" "github.com/derekparker/delve/service"
"github.com/derekparker/delve/service/rpc2" "github.com/derekparker/delve/service/rpc2"
"github.com/derekparker/delve/service/rpccommon" "github.com/derekparker/delve/service/rpccommon"
"github.com/derekparker/delve/terminal"
"github.com/fsnotify/fsnotify" "github.com/fsnotify/fsnotify"
) )
@ -152,7 +152,7 @@ func startDelveDebugger(addr string, ch chan int) int {
APIVersion: 2, APIVersion: 2,
WorkingDir: ".", WorkingDir: ".",
ProcessArgs: []string{abs}, ProcessArgs: []string{abs},
}, false) })
if err := server.Run(); err != nil { if err := server.Run(); err != nil {
beeLogger.Log.Fatalf("Could not start debugger server: %v", err) beeLogger.Log.Fatalf("Could not start debugger server: %v", err)
} }
@ -182,7 +182,7 @@ func startDelveDebugger(addr string, ch chan int) int {
} }
// Stop and kill the debugger server once user quits the REPL // Stop and kill the debugger server once user quits the REPL
if err := server.Stop(true); err != nil { if err := server.Stop(); err != nil {
beeLogger.Log.Fatalf("Could not stop Delve server: %v", err) beeLogger.Log.Fatalf("Could not stop Delve server: %v", err)
} }
return status return status