# Inconsistent Behavior of Revise.jl in VSCode

**URL:** <https://discourse.julialang.org/t/inconsistent-behavior-of-revise-jl-in-vscode/126381>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [February 27, 2025, 11:26am UTC](https://discourse.julialang.org/t/inconsistent-behavior-of-revise-jl-in-vscode/126381 "2025-02-27T11:26:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_jl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/matt_jl/32/52364_2.png) [@Matt\_jl](https://discourse.julialang.org/u/Matt_jl)\
**Post date:** [February 27, 2025, 11:26am UTC](https://discourse.julialang.org/t/inconsistent-behavior-of-revise-jl-in-vscode/126381/1 "2025-02-27T11:26:47Z")

</div>

Hi everyone,

I’m having serious trouble using Revise in VSCode. Sometimes it works perfectly, other times it doesn’t, and the behavior seems extremely inconsistent. I can’t figure out what’s going on.

I don’t even know where to start in explaining my issue, but I’ll try to be as clear as possible, though I realize this won’t be easy.

### The setup:

- I have created a module that contains utility functions for my work.
- In the same directory, I have a script where I import this module.
- Revise is automatically loaded in the REPL from `startup.jl` (I double-checked).
- My expectation: when I modify an exported function in the module, the change should automatically be reflected when I call the function in the script.

### The problem:

- At first, everything works great! I edit the module, run the script in the REPL, and the changes are applied automatically. Fantastic!
- Two days later, Revise randomly stops updating the imported functions. Or rather, sometimes it updates them once or twice, and then it just stops.
- I haven’t changed anything in my setup—no updates, no modifications that could have affected Revise’s behavior.
- Yes, all functions are properly exported from the module.
- I tried forcing a reload with `Revise.revise()`.
- I tried activating the environment before anything else.
- I searched this forum and tried every suggestion I found, but nothing worked.

I’m not looking for a specific bug fix since I can’t share my code. However, I’m curious if anyone has experienced something similar.

Any ideas? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![brianguenter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brianguenter/32/29519_2.png) [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Post date:** [March 1, 2025, 12:13am UTC](https://discourse.julialang.org/t/inconsistent-behavior-of-revise-jl-in-vscode/126381/2 "2025-03-01T00:13:42Z")

</div>

I had a similar problem a long time ago. VSCode was configured to autosave files on focus change, and to automatically format files on save.

I would make a change to a function in VSCode and then immediately try to execute that changed function in the repl. Sometimes it would be updated and sometimes not.

The cause was slow formatting. The file wasn’t written till the formatting completed which, for some files for no obvious reason, could take quite a few seconds. Revise isn’t triggered until the file changes. By which time I would have already tried to execute the function and gotten the old rather than the new definition.

Maybe something similar is happening in your case.
