mirror of
https://github.com/go-delve/delve.git
synced 2025-10-30 10:17:03 +08:00
dlv: Headless mode print listener address info (#487)
* Headless mode print listener address info * if Headless && Addr == localhost:0 print address * update listen flag changed check * terminal: headless print API server listening address
This commit is contained in:
@ -353,7 +353,6 @@ func execute(attachPid int, processArgs []string, conf *config.Config) int {
|
|||||||
Stop(bool) error
|
Stop(bool) error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if !Headless {
|
if !Headless {
|
||||||
ApiVersion = 2
|
ApiVersion = 2
|
||||||
}
|
}
|
||||||
@ -386,6 +385,8 @@ func execute(attachPid int, processArgs []string, conf *config.Config) int {
|
|||||||
|
|
||||||
var status int
|
var status int
|
||||||
if Headless {
|
if Headless {
|
||||||
|
// Print listener address
|
||||||
|
fmt.Printf("API server listening at: %s\n", listener.Addr())
|
||||||
ch := make(chan os.Signal)
|
ch := make(chan os.Signal)
|
||||||
signal.Notify(ch, syscall.SIGINT)
|
signal.Notify(ch, syscall.SIGINT)
|
||||||
<-ch
|
<-ch
|
||||||
|
|||||||
Reference in New Issue
Block a user