i try to setup visual studio code for development with go language. i install go extension by lukehoban, and dev tools from: github.com/alecthomas/gometalinter and github.com/derekparker/delve/cmd/dlv
ide doesn't show any errors. when i run the following code:
package main
import "fmt"
func main() {
fmt.Print("Enter a number: ")
var input float64
fmt.Scanf("%f
", &input)
output := input * 2
fmt.Println(output)
}
i cannot enter any data on step fmt.Scanf("%f
", &input)
in debug console shows "debugger.go:413: nexting", but after enter any data process is stopped.
when i run the code without breakpoints i got:
TypeError: Cannot read property 'currentGoroutine' of null at GoDebugSession.evaluateRequest (C:\Users\a.holikau.vscode\extensions\lukehoban.Go-0.6.44\out\src\debugAdapter\goDebug.js:595:45) at GoDebugSession.DebugSession.dispatchRequest (C:\Users\a.holikau.vscode\extensions\lukehoban.Go-0.6.44 ode_modules\vscode-debugadapter\lib\debugSession.js:421:22) at GoDebugSession.ProtocolServer._handleData (C:\Users\a.holikau.vscode\extensions\lukehoban.Go-0.6.44 ode_modules\vscode-debugadapter\lib\protocol.js:104:38) at Socket. (C:\Users\a.holikau.vscode\extensions\lukehoban.Go-0.6.44 ode_modules\vscode-debugadapter\lib\protocol.js:24:60) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18) at Socket.Readable.push (_stream_readable.js:134:10) at Pipe.onread (net.js:543:20)
any ideas how to fix it ?