# Crash only in VSCode

**URL:** <https://discourse.julialang.org/t/crash-only-in-vscode/136673>\
**Category:** General Usage\
**Created:** [April 10, 2026, 1:22pm UTC](https://discourse.julialang.org/t/crash-only-in-vscode/136673 "2026-04-10T13:22:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [April 10, 2026, 1:22pm UTC](https://discourse.julialang.org/t/crash-only-in-vscode/136673/1 "2026-04-10T13:22:03Z")

</div>

If I run the following code in a Julia (1.12.1) terminal, all fine:

```julia
using Pkg
cd(@ __DIR__ )
Pkg.activate(;temp=true)

Pkg.add("CondaPkg") # only once
import CondaPkg # only once
CondaPkg.add("ezodf") # only once
Pkg.add("PythonCall")
using PythonCall
const ez = pyimport("ezodf") 
dest_doc = ez.newdoc(doctype="ods", filename="an_ods_sheet.ods")

```

But if I run it in VSCode, I got a very quick "error/full stack’, followed by a crash of Julia.  
What’s wrong with it ?

EDIT  
I have set VSCode to use `/home/me/.juliaup/bin/julia --handle-signals=yes 2>/home/me/juliacrash.log` but still I can’t get the crash log…  
The `ez` object, both on VSCode and Terminal, seems fine:

```julia-auto
julia> ez
Python: <module 'ezodf' from '/tmp/jl_2ftHfg/.CondaPkg/.pixi/envs/default/lib/python3.14/site-packages/ezodf/ __init__.py'>

```

But then working with it will crash Julia, only in VSCode. Why?

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [April 10, 2026, 2:18pm UTC](https://discourse.julialang.org/t/crash-only-in-vscode/136673/2 "2026-04-10T14:18:20Z")

</div>

I managed to get a screenshot before it went off:

 ![Screenshot from 2026-04-10 16-15-01](https://global.discourse-cdn.com/julialang/original/3X/7/0/70066bc0b7cf6d3622f3fbf3f6112608e8a7c102.png)

EDIT: In Jupyter Notebook (in VSCode) it works:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/d/b/db0d58ff985ed5d5b075f57bd673c3a2e162ec61.png)

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [April 10, 2026, 3:57pm UTC](https://discourse.julialang.org/t/crash-only-in-vscode/136673/3 "2026-04-10T15:57:27Z")

</div>

Claude says:

> The stacktrace is very clear. The crash is caused by PythonCall + a Python library (ezodf) interacting badly inside the VS Code Julia process.  
> What’s happening  
> The crash originates here (top of your code):  
> const ez = pyimport(“ezodf”)  
> dest\_doc = ez.newdoc(doctype=“ods”, filename=“…”)  
> The stacktrace shows Julia crashing deep inside CPython internals (PyEval\_EvalFrame, PyFunction\_Vectorcall, etc.), called through PythonCall.jl. This is a segfault inside the embedded Python interpreter.  
> Why it works in a terminal but not VS Code  
> The VS Code Julia extension already loads its own Python environment for the language server. When your code then tries to load ezodf through PythonCall, there’s a conflict between two Python environments — the one VS Code initialized and the one PythonCall is trying to use (your Conda env at /tmp/jl\_K6Pb5t/.CondaPkg/…).

Hower, the solutions it propose don’t work :-//

---

<div class="post-metadata">

**Author:** ![mihalybaci](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mihalybaci/32/13528_2.png) [@mihalybaci](https://discourse.julialang.org/u/mihalybaci)\
**Post date:** [April 10, 2026, 5:13pm UTC](https://discourse.julialang.org/t/crash-only-in-vscode/136673/4 "2026-04-10T17:13:52Z")

</div>

I don’t know much about how VS Code works, I know I have to disable a setting to turn off auto-activating conda environments with every terminal (even Julia REPL ones). If you just try to open a new REPL in VS Code, do you see anythig about conda activation? If so, maybe disable that setting, which is in the Python extension (“Python \> Terminal: Activate Environment” uncheck it).

This of course may only be an issue if and only if you have the Python extension installed.

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [April 10, 2026, 9:50pm UTC](https://discourse.julialang.org/t/crash-only-in-vscode/136673/5 "2026-04-10T21:50:35Z")

</div>

I have disabled all the extensions (including Python) other than Julia but I still have this behaviour

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [April 11, 2026, 6:21am UTC](https://discourse.julialang.org/t/crash-only-in-vscode/136673/6 "2026-04-11T06:21:50Z")

</div>

This is super odd… in another machine (same Ubuntu 24.04 os) works fine, in my machine I still have the crash after the atomic bomb equivalent of completely deleting the `.julia` folder..

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [April 11, 2026, 1:32pm UTC](https://discourse.julialang.org/t/crash-only-in-vscode/136673/7 "2026-04-11T13:32:04Z")

</div>

Whenever I have issues that are specific to VSCode I make sure that I am not using an outdated version of the application. Even though the extensions update, the application might get outdated with time, causing incompatibility with extensions.

Try to install the exact same version of VSCode you have in the machine where everything works. Alternatively, try to update the VSCode to the latest stable version plus the latest version of the Julia + Python extensions.
