Readline() doesn't work on VS Code

When I run the following from VS Code it print a line asking for the degree, I enter it in the REPL but the program still waiting for an input

function main()
print("Give the degree : ")
line = readline()
deg = parse(Int, line)
.
.
.

1 Like

Hello uri! Welcome to the Julia Discourse! I hope you enjoy your experience with the programming language and in this community.

What you describe is a known bug of the VS Code extension for Julia. You can follow the issue, with some suggested workarounds while a solution is looked for, here:

As a side note, the excerpt of code that you posted was incomplete - at least it lacked the end of the function, and to make it more readable it’s recommendable to format it as code, enclosing it between “triple backticks”. See more recommendations and best practices here, in case you didn’t read it yet:

3 Likes

Thanks a lot!!!