Development package dependencies in VSCodium

I am working on a development package Modia3D which depends on another development package ModiaMath:

(@v1.5) pkg> status
Status `~/.julia/environments/v1.5/Project.toml`
...
  [ee78f7c6] Makie v0.11.1
  [eff96d63] Measurements v2.3.0
  [07f2c1e0] Modia3D v0.4.1-dev `~/modia/dev/Modia3D`
  [67ccffd1] ModiaMath v0.6.0-dev `~/modia/dev/ModiaMath`
  [91a5bcdd] Plots v1.9.1
...

In the Julia REPL I can execute code using include without problems. But when I start VSCodium with workspace ~/modia/dev/Modia3D, open the same source code file and execute “Run without Debugging”, I get the following error:

Importing Modia3D Version 0.4.2-dev (2020-11-03)
ERROR: LoadError: ArgumentError: Package ModiaMath [67ccffd1-116d-535b-ad39-76a8fd0cbf71] is required but does not seem to be installed:
 - Run `Pkg.instantiate()` to install all recorded dependencies.

What is the cause of this error and how can I fix it? VSCodium version is 1.51.1 and Julia language support version is 1.0.10.

Did you check what environment you are in? We might automatically activate your package’s env if that’s the only one in the workspace.

The status bar says “julia env: Modia3D”. Is there a way to register the ModiaMath dependency in it?

Just click on it and select @v1.5. I actually meant the REPL environment though, which, unfortunately, is a separate issue.

Thanks, this solved the dependency problem. :slightly_smiling_face: But now an env defined in .julia/config/startup.jl is not avialable:

ERROR: LoadError: InitError: KeyError: key "MODIA_PLOT_PACKAGE" not found

Isn’t the startup file executed for env v1.5?

I am sure that this can be fixed easily: How can I enable execution of .julia/config/startup.jl when using the standard Julia environment in VSCodium?

Your startup.jl should always be loaded by default, unless you’re using the Debug File in New Process command (in which case it’ll be loaded after https://github.com/julia-vscode/julia-vscode/pull/1806 is merged).

Sorry, I am not a VSCode expert. What I do is Run -> Run without Debugging via the GUI. Does this invoke the Debug File in New Process command? If so, how can I work around it?

After removing --startup-file=no in scripts/debugger/launch_wrapper.jl:15 it works as expected. Thanks for your help! :slight_smile:

It doesn’t invoke that particular command, but does in fact start a new process for your code. I’d recommend using the Julia: Execute File command instead, which uses the persistent REPL session for evaluation.