# Vscode-julia 1.2.4 fails with alt + enter execution (ctrl+enter works)

**URL:** https://discourse.julialang.org/t/vscode-julia-1-2-4-fails-with-alt-enter-execution-ctrl-enter-works/62966
**Category:** VS Code
**Created:** [June 15, 2021, 6:19pm UTC](https://discourse.julialang.org/t/vscode-julia-1-2-4-fails-with-alt-enter-execution-ctrl-enter-works/62966 "2021-06-15T18:19:18Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Steven\_Varga](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steven_varga/32/3529_2.png) [@Steven\_Varga](https://discourse.julialang.org/u/Steven_Varga)
#### Post date: [June 15, 2021, 6:19pm UTC](https://discourse.julialang.org/t/vscode-julia-1-2-4-fails-with-alt-enter-execution-ctrl-enter-works/62966/1 "2021-06-15T18:19:18Z")

</div>

**update** : tried the same setup with standard Julia 1.6.1 (as opposed to custom compile) and everything checks out. There should be something wrong with my Julia compile.

On vscode 1.57.0 with julia 1.5.3 the ALT+ENTER execution fails with the error below. Anyone else with similar experience? Can someone point me to the direction where I could start digging/unravelling the error message below?  
best wishes: steven

```julia
Version: 1.57.0
Commit: 605d200353dbca6137c470fe16af16ffe56702c2
Date: 2021-06-14T01:49:32.567Z
Electron: 12.0.9
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Linux x64 5.4.0-72-generic

```

```julia
[2021-06-15 13:26:23.072] [exthost] [error] Error: Connection to server got closed. Server will not be restarted.
	at _.handleConnectionClosed (/home/steven/.vscode-oss/extensions/julialang.language-julia-1.2.4/dist/extension.js:1:67714)
	at _.handleConnectionClosed (/home/steven/.vscode-oss/extensions/julialang.language-julia-1.2.4/dist/extension.js:7:51522)
	at t (/home/steven/.vscode-oss/extensions/julialang.language-julia-1.2.4/dist/extension.js:1:65493)
	at invoke (/home/steven/.vscode-oss/extensions/julialang.language-julia-1.2.4/dist/extension.js:1:122416)
	at o.fire (/home/steven/.vscode-oss/extensions/julialang.language-julia-1.2.4/dist/extension.js:1:123177)
	at Y (/home/steven/.vscode-oss/extensions/julialang.language-julia-1.2.4/dist/extension.js:7:165779)
	at invoke (/home/steven/.vscode-oss/extensions/julialang.language-julia-1.2.4/dist/extension.js:1:122416)
	at o.fire (/home/steven/.vscode-oss/extensions/julialang.language-julia-1.2.4/dist/extension.js:1:123177)
	at m.fireClose (/home/steven/.vscode-oss/extensions/julialang.language-julia-1.2.4/dist/extension.js:7:155852)
	at Socket.<anonymous> (/home/steven/.vscode-oss/extensions/julialang.language-julia-1.2.4/dist/extension.js:7:157432)
	at Socket.emit (events.js:327:22)
	at Pipe.<anonymous> (net.js:673:12) language-julia.executeCodeBlockOrSelectionAndMove

```

```julia
julia> versioninfo()
Julia Version 1.5.3
Commit 788b2c77c1 (2020-11-09 13:37 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
  WORD_SIZE: 64
  LIBM: libimf
  LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
Environment:
  JULIA_DEPOT_PATH = /home/steven/.julia:/usr/local/share/julia-depot
  JULIA_EDITOR = code
  JULIA_HDF5_PATH = /usr/local/
  JULIA_LOAD_PATH = @:@v#.#:@stdlib:/home/steven/.julia:/usr/local/share/julia-depot/environments/globalenv
  JULIA_MPIEXEC = srun
  JULIA_MPI_ABI = OpenMPI
  JULIA_MPI_BINARY = system
  JULIA_MPI_LIBRARY = libmpi
  JULIA_MPI_PATH = /usr/local
  JULIA_NUM_THREADS = 
  JULIA_PROJECT = /opt/projects/analytics

```

---

<div class="post-metadata">

### Author: ![cortner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cortner/32/204_2.png) [@cortner](https://discourse.julialang.org/u/cortner)
#### Post date: [June 15, 2021, 7:00pm UTC](https://discourse.julialang.org/t/vscode-julia-1-2-4-fails-with-alt-enter-execution-ctrl-enter-works/62966/2 "2021-06-15T19:00:03Z")

</div>

I also keep having problems with ALT+ENTER on and off. Sometimes highlighting the code block helps , sometimes not. Sometimes it recognises the code blocks sometimes it doesn’t. No idea how to reproduce.

---

<div class="post-metadata">

### Author: ![sairus7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sairus7/32/10816_2.png) [@sairus7](https://discourse.julialang.org/u/sairus7)
#### Post date: [June 15, 2021, 8:46pm UTC](https://discourse.julialang.org/t/vscode-julia-1-2-4-fails-with-alt-enter-execution-ctrl-enter-works/62966/3 "2021-06-15T20:46:26Z")

</div>

I don’t have such problems, but I do have a huge delay (tens of seconds) on Windows after starting a fresh vscode and Alt+Enter first line of code - and before “executing” symbol starts to show next to the line. Sometimes it is even longer, if REPL starts with `Precompiling VSCodeServer` message (I suppose due to vscode or Julia plugin updates).

---

<div class="post-metadata">

### Author: ![cortner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cortner/32/204_2.png) [@cortner](https://discourse.julialang.org/u/cortner)
#### Post date: [June 15, 2021, 8:53pm UTC](https://discourse.julialang.org/t/vscode-julia-1-2-4-fails-with-alt-enter-execution-ctrl-enter-works/62966/4 "2021-06-15T20:53:47Z")

</div>

there is also a freeze during package indexing, but then at least I see something is happening.

---

<div class="post-metadata">

### Author: ![Steven\_Varga](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steven_varga/32/3529_2.png) [@Steven\_Varga](https://discourse.julialang.org/u/Steven_Varga)
#### Post date: [June 16, 2021, 4:33am UTC](https://discourse.julialang.org/t/vscode-julia-1-2-4-fails-with-alt-enter-execution-ctrl-enter-works/62966/5 "2021-06-16T04:33:18Z")

</div>

yes, this is something to do with Julia infrastructure. I gutted/hacked a previous `vscode-julia` in December, 2020 with success; but 1.4.2 has gone a long way since in features and footprint. For good experience you need fast computer/ good setup and plenty of memory.

I managed to upgrade to `v1.4.2` using vanilla Julia; for now I got good experience. I am thankful for the authors to make this happen.

---

<div class="post-metadata">

### Author: ![ptoche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ptoche/32/23554_2.png) [@ptoche](https://discourse.julialang.org/u/ptoche)
#### Post date: [June 16, 2021, 6:26pm UTC](https://discourse.julialang.org/t/vscode-julia-1-2-4-fails-with-alt-enter-execution-ctrl-enter-works/62966/6 "2021-06-16T18:26:03Z")

</div>

> [@cortner](#):
>
> Sometimes it recognises the code blocks sometimes it doesn’t.

I’ve noticed this can happen when you have a syntax error, which is understandable.

---

<div class="post-metadata">

### Author: ![cortner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cortner/32/204_2.png) [@cortner](https://discourse.julialang.org/u/cortner)
#### Post date: [June 16, 2021, 6:33pm UTC](https://discourse.julialang.org/t/vscode-julia-1-2-4-fails-with-alt-enter-execution-ctrl-enter-works/62966/7 "2021-06-16T18:33:00Z")

</div>

that’s a great point, thank you.

But it isn’t just that. For me the worst case actually is when I’m developing code within a `@testset begin ... end` block. ALT+enter then just executes the entire test set, so I always have to highlight the code I want to execute, or to comment (and later again uncomment) the testset block lines.
