VSCode errors with user input readline()

SebaSharma
Mon, 24 Jan 2022 02:40:42 +0000
New to Julia

Hello, I hope you are all doing well
I’ve really been enjoying Julia, and it’s been taking the place of Java in my focused language, but I’ve been having some problems with user inputs in VSCode (Vers. 1.63.2 on Windows 11), Julia (Vers. 1.7)

Using this code as an example:

println("Please enter a number")
num = parse(Int, readline())
println("Thank you for entering $num")

I am given my prompt, and can input a number, but when I press enter for my number, it continues to prompt for input, and when I press enter (or type anything) I get the error:

This continues with or without parsing separately, and inside of functions.
If I seek out a String, and ignore parsing I end up getting
`UndefVarError: testinputstring not defined"

When I test either of these in the Julia REPL without VSCode, they work fine with no issues

I’m wondering what may be the source of the issue, and what solutions may be? I seem to find a similar issue for people using Juno, but in older versions of Julia

Thank you so much

6 posts - 5 participants