service/dap: avoid double removal of temp built binary (#2335)

* Avoid double removal of temp binary

* Add back accidentally removed empty line

* Simplify regex

* Use unique build output directories in test cases

* Recover TestLaunchDebugRequest hidden logging and refine error check

* Special case access-denied error on Windows

* Remove special case for access denied on Windows

* Increase remove delay on Win

Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
This commit is contained in:
polinasok
2021-02-24 08:19:07 -08:00
committed by GitHub
parent 92fb175192
commit 2e80b32c41
4 changed files with 28 additions and 2 deletions

View File

@ -413,6 +413,7 @@ func (d *Debugger) FunctionReturnLocations(fnName string) ([]uint64, error) {
// If `kill` is true we will kill the process after
// detaching.
func (d *Debugger) Detach(kill bool) error {
d.log.Debug("detaching")
d.targetMutex.Lock()
defer d.targetMutex.Unlock()
if ok, _ := d.target.Valid(); !ok {