# Julia version 1.9.0 on VSCODE , for loops and other weird output

**URL:** <https://discourse.julialang.org/t/julia-version-1-9-0-on-vscode-for-loops-and-other-weird-output/98716>\
**Category:** General Usage\
**Created:** [May 12, 2023, 7:04am UTC](https://discourse.julialang.org/t/julia-version-1-9-0-on-vscode-for-loops-and-other-weird-output/98716 "2023-05-12T07:04:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rocco\_sprmnt21](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rocco_sprmnt21/32/20127_2.png) [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Post date:** [May 12, 2023, 7:04am UTC](https://discourse.julialang.org/t/julia-version-1-9-0-on-vscode-for-loops-and-other-weird-output/98716/1 "2023-05-12T07:04:01Z")

</div>

trying to do simple for loop on julia 1.9.0 (in vscode),

```julia
for i in 1:10
    println(i)
end

```

julia seems to start evaluating endlessly up  
what i see on the repl is the following line

```julia
#87 for i in 1:10

```

```julia
julia> versioninfo()
Julia Version 1.9.0
Commit 8e63055292 (2023-05-07 11:25 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 8 × 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, tigerlake)
  Threads: 4 on 8 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 4

```

if i send running from vscode editor via shift-enter the following expression, this is the strange output on terminal REPL

```julia
julia>
#87letter=string.(Set(rand(10:20, 5)))
4-element Vector{String}:
 "20"
 "10"
 "18"
 "14"

```

my VSCODE version

```julia
Version: 1.78.2 (user setup)
Commit: b3e4e68a0bc097f0ae7907b217c1119af9e03435
Date: 2023-05-10T14:39:26.248Z
Electron: 22.5.2
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: No

```

Extension version: `v1.38.2`

---

<div class="post-metadata">

**Author:** ![Barget](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Barget](https://discourse.julialang.org/u/Barget)\
**Post date:** [May 12, 2023, 7:32am UTC](https://discourse.julialang.org/t/julia-version-1-9-0-on-vscode-for-loops-and-other-weird-output/98716/2 "2023-05-12T07:32:55Z")

</div>

I have same strange behavior. As a workaround, I switch to the pre-release version of the extension.

---

<div class="post-metadata">

**Author:** ![cserteGT3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/csertegt3/32/8283_2.png) [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Post date:** [May 12, 2023, 7:38am UTC](https://discourse.julialang.org/t/julia-version-1-9-0-on-vscode-for-loops-and-other-weird-output/98716/3 "2023-05-12T07:38:36Z")

</div>

It does work for me as expected with the shift-enter method.

```julia
julia> versioninfo()
Julia Version 1.9.0
Commit 8e63055292 (2023-05-07 11:25 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 8 × 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, tigerlake)
  Threads: 1 on 8 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS =

```

Extension version: `v1.38.2`

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [May 12, 2023, 8:00am UTC](https://discourse.julialang.org/t/julia-version-1-9-0-on-vscode-for-loops-and-other-weird-output/98716/4 "2023-05-12T08:00:04Z")

</div>

I’ve reproduced it by enabling the config option “Execution: Code in REPL”. Disabling it makes it work as expected (but code sent with shift+enter won’t be displayed).

Actually, the problem with the endless evaluation of the for-loop seems to be that only the first line of code blocks is sent to the REPL. The status bar tells “Evaluating…”, but then you can write anything on the REPL and it works as if the loop had never been sent.

Submitted an issue here:

> <https://github.com/julia-vscode/julia-vscode/issues/3301>
>
> Context:
> https://discourse.julialang.org/t/julia-version-1-9-0-on-vscode-for-lo…ops-and-other-weird-output/98716

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [May 12, 2023, 11:00am UTC](https://discourse.julialang.org/t/julia-version-1-9-0-on-vscode-for-loops-and-other-weird-output/98716/5 "2023-05-12T11:00:09Z")

</div>

This seems similar, though a bit distinct from [Weird behavior with execution on Julia 1.9-beta · Issue #3220 · julia-vscode/julia-vscode · GitHub](https://github.com/julia-vscode/julia-vscode/issues/3220)

I haven’t been having problems on 1.9, but I might still be using the insider build of the extension. Maybe give that a try?

---

<div class="post-metadata">

**Author:** ![DrPapa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drpapa/32/6835_2.png) [@DrPapa](https://discourse.julialang.org/u/DrPapa)\
**Post date:** [May 12, 2023, 2:51pm UTC](https://discourse.julialang.org/t/julia-version-1-9-0-on-vscode-for-loops-and-other-weird-output/98716/6 "2023-05-12T14:51:58Z")

</div>

> [@Barget](#):
>
> I have same strange behavior. As a workaround, I switch to the pre-release version of the extension.

Same here. Doing trivial things in `begin` would hang indefinitely but works in pre-release.

```jullia
begin
 x = 3
end

```
