Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to init with delve #154

Open
nemotoo opened this issue Mar 8, 2017 · 4 comments
Open

Fail to init with delve #154

nemotoo opened this issue Mar 8, 2017 · 4 comments
Labels

Comments

@nemotoo
Copy link

nemotoo commented Mar 8, 2017

System

  • macOS 10.12.3
  • go 1.8 with brew
  • delve 0.12.1
  • both iterm2 and default terminal
  • termbox-go (91bae1b)

With delve, termbox.Init() fail with "SYS_IOCTL: interrupted system call" err.
What should I do for debugging with delve?

@nsf
Copy link
Owner

nsf commented Mar 8, 2017

Have no idea. I don't have and don't use macosx. To debug it obviously you need to understand how termbox works and what it does. Source code is there. It's not a big lib.

@nsf nsf added the Bug label Mar 8, 2017
@nsf
Copy link
Owner

nsf commented Mar 8, 2017

Also is delve a Go debugger? Don't use it as well. But maybe it it works under linux I'll take a look at the weekend.

@teolandon
Copy link

A workaround is to run the termbox-go application, and then attach with delve from another terminal.

./tb-app
dlv attach <PID>

This allows delve to manipulate the terminal in its own terms, while termbox-go manipulates the other terminal in its own. It's a bit more tedious, especially since you need to find the PID of the app you're debugging, and you might want to block the app's execution until after you've attached, probably using a signal. But using the $! variable in bash you can easily get the PID of the last process and automate this using a small script (works especially well with a terminal multiplexer, since you can actually execute things in both terminals through the script to set everything up).

@robaho
Copy link

robaho commented Sep 7, 2018

as soon as I attach with delve input no longer works in the application - the application continues to run though. makes it impossible to control the application in order to reach a desired breakpoint. any work arounds for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants