# Can't terminate input for readlines() in VSCode REPL (Windows 10)

**URL:** <https://discourse.julialang.org/t/cant-terminate-input-for-readlines-in-vscode-repl-windows-10/111896>\
**Category:** New to Julia\
**Tags:** repl, vscode, io\
**Created:** [March 20, 2024, 5:45pm UTC](https://discourse.julialang.org/t/cant-terminate-input-for-readlines-in-vscode-repl-windows-10/111896 "2024-03-20T17:45:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [March 20, 2024, 8:12pm UTC](https://discourse.julialang.org/t/cant-terminate-input-for-readlines-in-vscode-repl-windows-10/111896/2 "2024-03-20T20:12:25Z")

</div>

The VS Code REPL does not seem to handle `readline()` properly - [see this post](https://discourse.julialang.org/t/readline-cr-behavior/71317/4).

FWIW, using a standard Julia REPL the following code works for me on Win10 to terminate with CTRL+D followed by ENTER _(while the VS Code REPL misses the first input line)_:

```julia
function readlines_stdin()
    lines = String[]
    while true
        s = readline(stdin)
        Int(first(s)) == 4 && break # CTRL+D, then ENTER to exit 
        push!(lines, s)
    end
    return lines
end

lines = readlines_stdin()

```

---

_[View the full topic](https://discourse.julialang.org/t/cant-terminate-input-for-readlines-in-vscode-repl-windows-10/111896)._
