# Julia VS code custom task

**URL:** <https://discourse.julialang.org/t/julia-vs-code-custom-task/53161>\
**Category:** VS Code\
**Tags:** question\
**Created:** [January 11, 2021, 2:41pm UTC](https://discourse.julialang.org/t/julia-vs-code-custom-task/53161 "2021-01-11T14:41:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrkosjan](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@mrkosjan](https://discourse.julialang.org/u/mrkosjan)\
**Post date:** [January 11, 2021, 2:41pm UTC](https://discourse.julialang.org/t/julia-vs-code-custom-task/53161/1 "2021-01-11T14:41:19Z")

</div>

Hello, I am trying to setup a vs code task to run a Julia extension command in the active VS code REPL.

What I hope to achieve is to bind a hotkey to a task that will run the `runtest.jl` file in the currently active REPL. I want to use this instead of the existing “Julia: Run Tests” (ctrl+shift+t) task because the existing task starts in a new REPL and takes ages to run on my machine.

What I have now is following:

```julia
{
    "version": "2.0.0",
    "tasks": [
        {
            "command": "language-julia.executeFile",
            "args": [
                "${workspaceFolder}/test/runtests.jl"
            ],
            "label": "julia: Run runtest.jl in REPL"
        }
    ]
}

```

but I get `Unable to resolve filesystem provider with relative file path ''` when I try to run it.

I asked about this previously on slack (question and answer are now gone from there), and someone made a pull request for `executeFile` to accept strings as well as uris. I am unsure whether that is part of the published extension and whether that is what is causing the error, as I have no clue how to debug this.

My failing task is based on the docs [here](https://code.visualstudio.com/docs/editor/variables-reference#_settings-command-variables-and-input-variables) and [here](https://code.visualstudio.com/docs/editor/tasks).

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [January 11, 2021, 2:44pm UTC](https://discourse.julialang.org/t/julia-vs-code-custom-task/53161/2 "2021-01-11T14:44:57Z")

</div>

Pretty sure that change to `executeFile` is only in the insiders builds. Can you give the most recent one a shot?

---

<div class="post-metadata">

**Author:** ![mrkosjan](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@mrkosjan](https://discourse.julialang.org/u/mrkosjan)\
**Post date:** [January 11, 2021, 7:06pm UTC](https://discourse.julialang.org/t/julia-vs-code-custom-task/53161/3 "2021-01-11T19:06:19Z")

</div>

In the insider build, new shell is opened and the following message appears:

```julia
> Executing task: language-julia.executeFile /mnt/c/Users/user/julia/MyProject/test/runtests.jl <

The terminal process failed to launch: Path to shell executable "language-julia.executeFile" does not exist.

Terminal will be reused by tasks, press any key to close it.

```

So I think I am not using the extension command properly in the task.  
Looking at the VS code docs, I think I might have reused a wrong code snippet. As I understand it, custom task can either run as a shell command or start a new process? I am unsure how to connect the task to the running REPL…
