service/dap: add throw reason to exception info (#2524)

We can get the throw reason by looking at the argument "s" in runtime.throw. This is not currently working in Go 1.16 or Go 1.17 (see golang/go#46425), but does work in Go 1.15 and Go 1.14
This commit is contained in:
Suzy Mueller
2021-06-28 11:39:34 -04:00
committed by GitHub
parent 7411290468
commit 1ebfc5c37b
4 changed files with 78 additions and 3 deletions

View File

@ -237,6 +237,12 @@ func (d *Debugger) checkGoVersion() error {
return goversion.Compatible(producer)
}
func (d *Debugger) TargetGoVersion() string {
d.targetMutex.Lock()
defer d.targetMutex.Unlock()
return d.target.BinInfo().Producer()
}
// Launch will start a process with the given args and working directory.
func (d *Debugger) Launch(processArgs []string, wd string) (*proc.Target, error) {
if err := verifyBinaryFormat(processArgs[0]); err != nil {