@edit ERROR: IOError: could not spawn `code -g 'C:\Users\

Hi, I get

julia> @edit complex(0, 1)
ERROR: IOError: could not spawn `code -g 'C:\Users\xxx\AppData\Local\Programs\Julia-1.7.0-rc1\share\julia\base\complex.jl:171'`: no such file or directory (ENOENT)
Stacktrace:
  [1] _spawn_primitive(file::String, cmd::Cmd, stdio::Vector{Any})
    @ Base .\process.jl:100
  [2] #690
    @ .\process.jl:113 [inlined]
  [3] setup_stdios(f::Base.var"#690#691"{Cmd}, stdios::Vector{Any})
    @ Base .\process.jl:197
  [4] _spawn
    @ .\process.jl:112 [inlined]
  [5] _spawn(::Base.CmdRedirect, ::Vector{Any})
    @ Base .\process.jl:140
  [6] run(::Base.CmdRedirect; wait::Bool)
    @ Base .\process.jl:449
  [7] (::InteractiveUtils.var"#2#3"{Bool, InteractiveUtils.var"#11#21", Vector{String}})(cmd::Cmd, path::String, line::Int32)
    @ InteractiveUtils C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\InteractiveUtils\src\editless.jl:98
  [8] edit(path::String, line::Int32)
    @ InteractiveUtils C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\InteractiveUtils\src\editless.jl:205
  [9] edit(f::Any, t::Any)
    @ InteractiveUtils C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\InteractiveUtils\src\editless.jl:234
 [10] top-level scope
    @ REPL[57]:1

complex.jl exists in

C:\Users\xxx\AppData\Local\Programs\Julia-1.7.0-rc1\share\julia\test
C:\Users\xxx\AppData\Local\Programs\Julia-1.7.0-rc1\share\julia\base

Afte changing to 1.7.0-rc2, @edit works in the terminal, but not in VScode.

Try changing the julia.editor setting to code.cmd.

Hm. In the settings:

Julia: Editor

Command to open files from the REPL (via setting the `JULIA_EDITOR` environment variable). Defaults to `code` / `code-insiders` if unset.

Edit in settings.json

But there is no variable JULIA_EDITOR or julia_editor in settings.json.

Yeah, that’s the setting you’re supposed to change.

Yes, it’s been dawning on me.
Working now with settings.json - Thx a lot!

{
    "julia.editor": "code.cmd",
...