# 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:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![olmdshumel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olmdshumel/32/207879_2.png) [@olmdshumel](https://discourse.julialang.org/u/olmdshumel)
#### Post date: [March 20, 2024, 5:45pm UTC](https://discourse.julialang.org/t/cant-terminate-input-for-readlines-in-vscode-repl-windows-10/111896/1 "2024-03-20T17:45:46Z")

</div>

I’m using readlines() to get multi-line input with a non-fixed number of lines of user input from stdin, but I can’t get readlines() to stop taking input. I’ve tried alt+enter, esc+enter, shift+enter, alt+shift+enter, ctrl+enter, ctrl+D. How do I denote the end of my input? Thank you!

---

<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()

```
