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

[vscode] debugger console input #11

Closed
parkgang opened this issue Jan 22, 2021 · 0 comments
Closed

[vscode] debugger console input #11

parkgang opened this issue Jan 22, 2021 · 0 comments

Comments

@parkgang
Copy link

parkgang commented Jan 22, 2021

Description

안녕하세요. vscode로 golang 개발 중 debugger 상태에서는 input이 안 된다고 합니다.

다른 방법을 찾아보니 console에 attach 해서 사용하는 방법이 있다고 합니다.

이보다 더 좋은 방법을 알고 계신 분이 있다면 공유부탁드립니다.

Source code

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")
}

레퍼런스

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

No branches or pull requests

1 participant