mirror of
https://github.com/go-delve/delve.git
synced 2025-10-30 02:07:58 +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
|
||||
}
|
||||
|
||||
|
||||
if !Headless {
|
||||
ApiVersion = 2
|
||||
}
|
||||
@ -386,6 +385,8 @@ func execute(attachPid int, processArgs []string, conf *config.Config) int {
|
||||
|
||||
var status int
|
||||
if Headless {
|
||||
// Print listener address
|
||||
fmt.Printf("API server listening at: %s\n", listener.Addr())
|
||||
ch := make(chan os.Signal)
|
||||
signal.Notify(ch, syscall.SIGINT)
|
||||
<-ch
|
||||
|
||||
Reference in New Issue
Block a user