Scanln fails to stop for input during debug on Linux
Closed this issue · 3 comments
-
Plugin version (or commit hash):
0.13.1914 -
IDE name and version:
IntelliJ IDEA community -
Go version;
1.7.3 -
Java version:
1.8.0_111 -
OS name and version:
Ubuntu 16.04.1 LTS -
What are you trying to do?
Trying to get program to stop for input on fmt.Scanln -
What would you expect to happen?
Execution to wait for input when Scanln is reached -
What happens?
Execution continues and program acts like empty string/white space was entered
This is really simple example I created to test the Scanln issue as I used to get it on Windows. Funny story: on windows it now works (same IDE, plugin and go versions) but fails under Linux.
Code:
package main
import "fmt"
func main() {
var x string
fmt.Println("Type smth:")
fmt.Scanln(&x)
fmt.Println("Typed:", x)
}
This works if simply executed either in IDE or using simple 'go build' from command line, but fails when debuger is attached.
Tested configuration:
This looks like delve issue. Moved to https://github.com/derekparker/delve/issues/679.
Closed.
Thank you for investigation. Indeed it looks like delve's issue