I have been trying to configure Revise.jl on VS Code (I am new to VS Code since I found Julia to be fiddly with emacs). I enabled using Revise.jl to be executed when I start a new REPL.
I am developing a package. Essentially, I load the package by starting a new REPL Julia: Execute active file in REPL which executes my module:
module MyPkg
include("AnotherFile.jl")
f() = "helloworld"
end
and AnotherFile.jl:
# AnotherFile.jl
g() = "HelloWorld Again" # I added this later to test Revise.jl
When this is started on the REPL, I can see Revise on my workspace but this file is not among Revise.watched_files list for some reason. On the other hand, AnotherFile.jl is included in this list. My current environment is my package.
When I execute MyPkg.f(), I get the expected result. However, modifying it, saving, and doing MyPkg.f() again leads to the exact same result without my new modifications.
I try to add a g() function to AnotherFile.jl and try to execute MyPkg.g() and Julia says that this function cannot be found.
Is there a way to fix or debug this? I can never get it to work.
Welcome to the Julia discourse community 
Hm, this is a bit hard for me to reproduce.
One remark, however: If you execute both files in the same REPL (I would do include("YourFirstFileWithPkg.jl"); include("AnotherFile.jl"); - but evaluate in active REPL is the same)
then g is defined in the global namespace and not in your module. So that makes sense that it is not found. That is not related to Revise, but where the function g is defined.
For your f and the module you define, I am not able to follow what you do, sorry.
Hi!
Julia’s Julia: Execute active file in REPL does not load the module the same way as using MyPkg; as far as I understand, it behaves more like include("MyPkg.jl"), this way the files are not tracked correctly.
A quick fix:
- type
includet("MyPkg.jl") into your current REPL – this will track the file correctly (change "MyPkg.jl" to the correct filename)
A better workflow:
- Activate your project environment (click
{} Julia on the status bar in the bottom of the window)
- Launch a new Julia REPL (
Julia: Start REPL in the command pallette)
- Type
using MyPkg
- Now you can freely modify your module and enjoy Revise.jl

7 Likes
This is not a direct answer to your question, but if you otherwise prefer Emacs, I would invest in fixing that (whatever the problem is). I find Emacs+Julia just great. There are multiple ways to interact with Julia, eg julia-snail, julia-repl, LSP support is fine now with eglot, etc.
3 Likes
This worked for me! Thanks
2 Likes
Thanks. Digression to the topic. I am not very new to Julia and had been using julia-snail + lsp-julia for some time (I never used Revise.jl before). I had to SSH into another PC with a different $HOME directory from my local PC and lsp-julia broke for me and the fix isn’t obvious to me and so I just decided to switch to VS Code to get my work done. But otherwise, I agree that the support for emacs + julia is phenomenal
2 Likes
This worked on my local PC and another SSH host that I tried.
But on a shared GPU server among my colleagues, I think the reason why Revise.jl is not working is because my home directory is mounted as NFS. Not sure if that means anything but it’s the only difference between all hosts I have tested on using your exact steps.
I have found the docs on JULIA_REVISE_POLL useful, though.
1 Like