Closed parkgang closed 3 years ago
안녕하세요. vscode로 golang 개발 중 debugger 상태에서는 input이 안 된다고 합니다.
다른 방법을 찾아보니 console에 attach 해서 사용하는 방법이 있다고 합니다.
이보다 더 좋은 방법을 알고 계신 분이 있다면 공유부탁드립니다.
package main import ( "bufio" "fmt" "os" ) func main() { fmt.Print("Enter a grade: ") reader := bufio.NewReader(os.Stdin) input, _ := reader.ReadString('\n') fmt.Print(input) fmt.Println("End") }
Description
안녕하세요. vscode로 golang 개발 중 debugger 상태에서는 input이 안 된다고 합니다.
다른 방법을 찾아보니 console에 attach 해서 사용하는 방법이 있다고 합니다.
이보다 더 좋은 방법을 알고 계신 분이 있다면 공유부탁드립니다.
Source code
레퍼런스