Closed nbys closed 8 years ago
spawn EACCES
most likely means that you are not allowed to run dlv
.
Did you install dlv
manually (like it is described in here) or automatically by go-debug
?
If manually you may have to change the permissions of the dlv
executable in your $GOPATH/bin
folder. So something like chmod u+x $GOPATH/bin/dlv
should help
The issue has been solved. Thanks @lloiser
[Enter steps to reproduce below:]
Atom Version: 1.10.0-beta6 Electron Version: 0.37.8 System: Mac OS X 10.11.5 Thrown From: go-debug package, v0.1.22
Uncaught Error: spawn EACCES
At internal/child_process.js:302
Error: spawn EACCES
at exports._errnoException (util.js:890:11)
at ChildProcess.spawn (internal/child_process.js:302:11)
at exports.spawn (child_process.js:379:9)
at run (/Users/bilibili/.atom/packages/go-debug/lib/delve.js:58:16)
at Object.runPackage (/Users/bilibili/.atom/packages/go-debug/lib/delve.js:21:10)
at atom-text-editor.action (/Users/bilibili/.atom/packages/go-debug/lib/commands.js:27:25)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
at /Applications/Atom Beta.app/Contents/Resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:580:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/window-event-handler.js:98:36)
at HTMLDocument.<anonymous> (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)
-7:40.4.0 application:add-project-folder (atom-text-editor.editor.is-focused)
2x -7:32 go-debug:run-package (atom-text-editor.editor.is-focused)
-6:08.3.0 settings-view:open (atom-text-editor.editor.is-focused)
6x -5:33.4.0 core:move-left (atom-text-editor.editor.mini.is-focused)
-5:31 core:confirm (atom-text-editor.editor.mini.is-focused)
6x -5:22.1.0 core:backspace (atom-text-editor.editor.mini.is-focused)
-5:19.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-3:57.3.0 settings-view:open (atom-text-editor.editor.is-focused)
2x -3:11.1.0 go-debug:run-package (atom-text-editor.editor.is-focused)
-2:52.5.0 application:new-file (div.package-detail.panels-item)
2x -2:51.5.0 core:paste (atom-text-editor.editor.is-focused)
2x -0:06.2.0 core:save (atom-text-editor#go-debug.dlvPath.editor.mini.is-focused)
-0:00.1.0 go-debug:run-package (atom-text-editor.editor.is-focused)
{
"core": {},
"go-debug": {
"dlvPath": "/usr/local/Cellar/delve/0.11.0/bin"
}
}
# User
autocomplete-go, v1.3.0 (active)
builder-go, v1.0.1 (active)
file-icons, v1.7.25 (active)
go-config, v1.2.4 (active)
go-debug, v0.1.22 (active)
go-get, v2.1.1 (active)
go-oracle, v0.2.1 (inactive)
go-plus, v4.3.2 (active)
godoc, v1.1.1 (active)
gofmt, v1.2.0 (active)
gometalinter-linter, v1.2.2 (active)
gorename, v1.1.0 (active)
linter, v1.11.18 (active)
minimap, v4.25.7 (active)
navigator-go, v1.1.3 (active)
tester-go, v2.0.2 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.44.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.5.0 (active)
one-light-ui, v1.5.0 (inactive)
one-dark-syntax, v1.3.0 (active)
one-light-syntax, v1.3.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.3 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.2 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.41.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.39.0 (active)
find-and-replace, v0.201.0 (inactive)
fuzzy-finder, v1.3.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.1 (active)
image-view, v0.58.2 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (active)
notifications, v0.65.0 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.241.2 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.0 (active)
symbols-view, v0.113.0 (inactive)
tabs, v0.100.2 (active)
timecop, v0.33.2 (active)
tree-view, v0.208.2 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.34.0 (active)
whitespace, v0.33.0 (active)
wrap-guide, v0.38.1 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.2 (active)
language-csharp, v0.12.1 (active)
language-css, v0.37.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.42.1 (active)
language-html, v0.45.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.23.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.2 (active)
language-less, v0.29.5 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.2 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.69.0 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.56.0 (active)
language-shellscript, v0.22.4 (active)
language-source, v0.9.0 (active)
language-sql, v0.23.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.9 (active)
language-yaml, v0.26.0 (active)
# Dev
No dev packages
@lloiser @cxww107
leslie at golang in ~/g/src
» dlv debug empty.go
Type 'help' for list of commands.
(dlv)
run cmd at terminal is ok.
What's the output of which -a dlv
? It should only return one result.
Are you sure "/usr/local/Cellar/delve/0.11.0/bin"
is the path to a dlv
executable?
@lloiser I sure.
» cd /usr/local/Cellar/delve/0.11.0/bin
leslie at golang in /u/l/C/d/0/bin
» dlv
Delve is a source level debugger for Go programs.
Delve enables you to interact with your program by controlling the execution of the process,
evaluating variables, and providing information of thread / goroutine state, CPU register state and more.
The goal of this tool is to provide a simple yet powerful interface for debugging Go programs.
Usage:
dlv [command]
Available Commands:
version Prints version.
run Deprecated command. Use 'debug' instead.
debug Compile and begin debugging program.
exec Runs precompiled binary, attaches and begins debug session.
trace Compile and begin tracing program.
test Compile test binary and begin debugging program.
attach Attach to running process and begin debugging.
connect Connect to a headless debug server.
Flags:
--build-flags="": Build flags, to be passed to the compiler.
--headless[=false]: Run debug server only, in headless mode.
-h, --help[=false]: help for dlv
--init="": Init file, executed by the terminal client.
-l, --listen="localhost:0": Debugging server listen address.
--log[=false]: Enable debugging server logging.
Use "dlv [command] --help" for more information about a command.
Can you try chmod a+x
the delve binary (you may need sudo
)
leslie at golang in /u/l/C/d/0/bin
» ll
total 15136
drwxr-xr-x 3 leslie admin 102B Dec 14 12:13 ./
drwxr-xr-x 8 leslie admin 272B Dec 14 12:13 ../
-r-xr-xr-x 1 leslie admin 7.4M Dec 14 12:13 dlv*
leslie at golang in /u/l/C/d/0/bin
» users
leslie
Set the full path to the executable into the dlv path
setting of go-debug, not only the folder it's in: /usr/local/Cellar/delve/0.11.0/bin/dlv
If this still does not work try to re-install dlv (I guess you installed it via brew
)
Atom Version: 1.9.9 System: Mac OS X 10.11.6 Thrown From: go-debug package, v0.1.20
Stack Trace
Uncaught Error: spawn EACCES
Commands
Config
Installed Packages