$ dlv -run
[Could not start process: fork/exec ./debug: permission denied]
$ chmod +x ./debug
$ dlv -run
[Could not start process: fork/exec ./debug: permission denied]
Some more context around this would also be nice. What do you mean by "debugging of tests"? Are you in a test dir and trying to compile and run all of your tests? dlv -run will compile and run based off of the current dir. It's using go build under the hood, so anything that wouldn't normally be compiled, like tests, get ignored.
If you want to debug tests try go test -c; dlv ./foo.test.
Going to close this issue out. If the above suggestions do not solve this, please feel free to reopen with more context. Thanks.
I just came across this issue when trying to debug a 'non-main' package with dlv debug. That's likely the cause.
@ajpen if you want to debug a non-main package (that has tests) you can use dlv test <pkg>. If that doesn't work please submit a new issue.
@derekparker Good to hear from you Derek. I just placed that comment up to give some context for anyone else that might run into it and find themselves here. Thanks
Most helpful comment
@ajpen if you want to debug a non-main package (that has tests) you can use
dlv test <pkg>. If that doesn't work please submit a new issue.