mirror of
https://github.com/go-delve/delve.git
synced 2025-10-28 04:35:19 +08:00
Add pid flag to trace subcommand
This commit is contained in:
@ -90,6 +90,11 @@ func Attach(pid int) (*Process, error) {
|
||||
|
||||
// Detach from the process being debugged, optionally killing it.
|
||||
func (dbp *Process) Detach(kill bool) (err error) {
|
||||
if dbp.Running() {
|
||||
if err = dbp.Halt(); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
if !kill {
|
||||
// Clean up any breakpoints we've set.
|
||||
for _, bp := range dbp.Breakpoints {
|
||||
|
||||
Reference in New Issue
Block a user