# VS Code won't run tests anymore

**URL:** <https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233>\
**Category:** General Usage\
**Created:** [May 21, 2025, 9:43pm UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233 "2025-05-21T21:43:34Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ken\_Williams](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ken_williams/32/5289_2.png) [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)\
**Post date:** [May 21, 2025, 9:43pm UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233/1 "2025-05-21T21:43:34Z")

</div>

My test pane (with the chemistry beaker icon) in VS Code won’t run tests anymore, as of this week. When I click on the “run” button, for all of the tests together or just a single test, it seems to just hang forever.

Running tests in a normal REPL by using `] test` works fine, but is of course much slower and doesn’t allow running a single test by point-and-click.

My tests are `@testitem` style, so they look similar to this:

```julia
@testitem "fill_missing!()" begin
    using DataFrames

    df = DataFrame(; A = [1, 2, missing, 4], B = [missing, 2, 3, 4])

    @test_logs (:warn, r"Filling in 1 A value") begin
        MyPackage.fill_missing!(df, :A)
    end
    @test df.A == [1, 2, 0.0, 4]

    @test_logs (:warn, r"Filling in 1 B value") begin
        MyPackage.fill_missing!(df, :B; value = 1.0)
    end
    @test df.B == [1.0, 2, 3, 4]

    @test_logs (:warn, r"No C column found in my DF; using default") begin
        MyPackage.fill_missing!(df, :C; value = 2.0, name = "my DF")
    end
    @test df.C == [2.0, 2.0, 2.0, 2.0]
end

```

In trying to diagnose what’s going wrong, I can’t seem to find much info. In the “output” pane, I see the following for the Test Item Controller:

```julia
[ Info: Starting test item controller on Julia 1.11.5
  Activating project at `~/.vscode/extensions/julialang.language-julia-1.140.2/scripts/environments/testitemcontroller/v1.11`
Precompiling TestItemControllers...
   1632.5 ms ✓ TestItemControllers
  1 dependency successfully precompiled in 2 seconds. 5 already precompiled.

```

Nothing in any of the other “output” selections seems to have anything relevant.

Is there some way to invoke the Testing pane action manually, e.g. in a vanilla REPL? Or to convince VS Code to run with debug logging turned on, or something? In general, any suggestions for how to get more information about what might be going wrong?

---

<div class="post-metadata">

**Author:** ![adolgert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adolgert/32/20286_2.png) [@adolgert](https://discourse.julialang.org/u/adolgert)\
**Post date:** [May 22, 2025, 12:09am UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233/2 "2025-05-22T00:09:57Z")

</div>

There is a way to run it in a vanilla REPL. I’m not sure what other people do, but I use a small file I call “cli.py”:

```julia
using ArgParse
using TestEnv
using TestItemRunner
using YourPackageNameHere

# For running tests from a Bash prompt.
# julia --project=test test/cli.jl [--file <substring>] [--function <substring>]
# You need to ensure the test/Project.toml is set to Plg.develop(UnitTestDesign)
# so that it can load that in the activate() below.

function parse_testcli(env_args)
    settings = ArgParseSettings()
    @add_arg_table settings begin
        "--file"
            help = "File to test"
            arg_type = String
            required = false
        "--name"
            help = "Name of the test to run"
            arg_type = String
            required = false
    end
    return parse_args(env_args, settings)
end

TestEnv.activate("YourPackageNameHere") do
    args = parse_testcli(ARGS)
    matches = Function[ti -> true]
    if args["file"] !== nothing
        push!(matches, ti -> endswith(join(splitext(ti.filename)[1:end-1]), args["file"]))
    end
    if args["name"] !== nothing
        push!(matches, ti -> occursin(args["name"], ti.name))
    end
    @run_package_tests filter=ti -> all(map(f -> f(ti), matches))
end

```

Maybe somebody else knows about getting the VSCode one to work.  
Cheers - Drew

---

<div class="post-metadata">

**Author:** ![disberd](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@disberd](https://discourse.julialang.org/u/disberd)\
**Post date:** [May 22, 2025, 5:55am UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233/3 "2025-05-22T05:55:09Z")

</div>

I have also experienced a similar issue in the last week, though not on every project I have which is even weirder.

Unfortunately as in your case @Ken_Williams the output pane is not giving much information (I only have the activating part).

I wonder whether there is a way (e.g. with a setting or flag) to give more debug output.

Tagging @davidanthoff and @pfitzseb as they might have some obvious insights.

Edit: it seems there is also a related issue opened a few hours ago

> <https://github.com/julia-vscode/julia-vscode/issues/3817>
>
> Using \`@testitem\` alongside the Testing view to run tests, the tests never get p…ast the (Queued) state (with the clock & arrow symbol). The tests run in the command-line fine by including runtest.jl. Julia Language Server produces no output after setting up the language server. 
> 
> !\[Image\](https://github.com/user-attachments/assets/e18fccaf-c2b2-46cf-ba94-143e0094e03d)
> 
> !\[Image\](https://github.com/user-attachments/assets/415a0ad3-1f85-468a-b7ac-361d8108be8d)

---

<div class="post-metadata">

**Author:** ![Ken\_Williams](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ken_williams/32/5289_2.png) [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)\
**Post date:** [May 22, 2025, 3:11pm UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233/4 "2025-05-22T15:11:10Z")

</div>

> [@adolgert](#):
>
> There is a way to run it in a vanilla REPL. I’m not sure what other people do, but I use a small file I call “cli.py”:

I do have a way to run my tests, basically the same idea as yours but without the CLI processing:

```julia
using TestItemRunner

# Filter out the TestItemRunner tests, see
# https://github.com/julia-vscode/TestItemRunner.jl/issues/94
function my_filter(ti)
    return contains(dirname(ti.filename), r"MyPackageName(\.jl)?/test")
end
@run_package_tests filter = my_filter

```

However, this doesn’t exhibit the hanging behavior, it succeeds fine.

What I think I’d need for this is a way to run what VS Code itself is doing as a part of the Julia plugin.

---

<div class="post-metadata">

**Author:** ![jClugstor](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jclugstor/32/32689_2.png) [@jClugstor](https://discourse.julialang.org/u/jClugstor)\
**Post date:** [May 22, 2025, 4:12pm UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233/5 "2025-05-22T16:12:34Z")

</div>

I think TestItemRunner is what you’re looking for: [Test Item Framework · Julia in VS Code](https://www.julia-vscode.org/docs/stable/userguide/testitems/#Running-tests-from-the-command-line)

---

<div class="post-metadata">

**Author:** ![Ken\_Williams](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ken_williams/32/5289_2.png) [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)\
**Post date:** [May 22, 2025, 4:17pm UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233/6 "2025-05-22T16:17:10Z")

</div>

> [@jClugstor](#):
>
> I think TestItemRunner is what you’re looking for: [Test Item Framework · Julia in VS Code](https://www.julia-vscode.org/docs/stable/userguide/testitems/#Running-tests-from-the-command-line)

I don’t think so. See the above messages. That doesn’t appear to be what VS Code is using for the Testing pane, or at least when I run the tests using TestItemRunner, it doesn’t hang like it does in the Testing pane.

---

<div class="post-metadata">

**Author:** ![Ken\_Williams](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ken_williams/32/5289_2.png) [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)\
**Post date:** [May 22, 2025, 4:20pm UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233/7 "2025-05-22T16:20:10Z")

</div>

As an experiment, I quit VS Code, deleted my `~/Library/Application Support/Code/User/globalStorage/julialang.language-julia` directory, and re-launched VS Code.

No difference, it still hangs after re-creating that directory.

---

<div class="post-metadata">

**Author:** ![Ken\_Williams](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ken_williams/32/5289_2.png) [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)\
**Post date:** [May 22, 2025, 4:59pm UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233/8 "2025-05-22T16:59:33Z")

</div>

I did a little debugging after finding out what code seems to be involved. It’s a little tough because it’s doing socket communication and I’m not sure what’s on the other end of the socket, but here’s some info.

I put `ENV["JULIA_DEBUG"] = "all"` into `~/.vscode/extensions/julialang.language-julia-1.140.2/scripts/apps/testitemcontroller_main.jl`:

```julia
...
ENV["JULIA_DEBUG"] = "all"
using Logging
global_logger(ConsoleLogger(stderr))
...

```

and then put some extra debugging messages into `~/.vscode/extensions/julialang.language-julia-1.140.2/scripts/packages/TestItemControllers/src/testitemcontroller.jl`:

```julia
...
function Base.run(
    controller::TestItemController,
    testprocess_created_callback,
    testprocess_terminated,
    testprocess_statuschanged,
    testprocess_output
)
    @debug "Initiated Base.run()"
    while true
        @debug "Listening for message from $(controller.msg_channel)"
        msg = take!(controller.msg_channel)
        @debug "Controller msg" msg
...

```

In VS Code’s output pane, I now see this:

```julia
┌ Debug: Initiated Base.run()
└ @ TestItemControllers ~/.vscode/extensions/julialang.language-julia-1.140.2/scripts/packages/TestItemControllers/src/testitemcontroller.jl:67
┌ Debug: Listening for message from Channel{Any}(9223372036854775807)
└ @ TestItemControllers ~/.vscode/extensions/julialang.language-julia-1.140.2/scripts/packages/TestItemControllers/src/testitemcontroller.jl:69

```

and then no more logs. So it appears to be hanging on receiving the input from the socket, but I’m not sure what that means.

---

<div class="post-metadata">

**Author:** ![MackHarry](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mackharry/32/13943_2.png) [@MackHarry](https://discourse.julialang.org/u/MackHarry)\
**Post date:** [May 22, 2025, 7:39pm UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233/9 "2025-05-22T19:39:43Z")

</div>

Same problem. Activating any testitem style test via the gui sends the test pane into some endlessly hanging process, while running the tests from REPL is fine.Only getting the ‘activating…’ output from the test item control. Not the first idea how to go about debugging this.

---

<div class="post-metadata">

**Author:** ![kbarros](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kbarros/32/7723_2.png) [@kbarros](https://discourse.julialang.org/u/kbarros)\
**Post date:** [May 22, 2025, 8:15pm UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233/10 "2025-05-22T20:15:34Z")

</div>

As a workaround, you can try installing julia-vscode extension version 1.138.1, which is from 4 months ago. From the Extensions pane, you can click “Uninstall” drop-down, then “Install Specific Version…” as shown in the image.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/d/fd504c2e17e501aa2a7acfed52fba7b52764b908.png)

---

<div class="post-metadata">

**Author:** ![MackHarry](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mackharry/32/13943_2.png) [@MackHarry](https://discourse.julialang.org/u/MackHarry)\
**Post date:** [May 22, 2025, 8:25pm UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233/11 "2025-05-22T20:25:27Z")

</div>

thank you! There only was 1.127.2 available (the newest version other than the current one), but using it tests work again, and makes dev life a lot easier 🙂

---

<div class="post-metadata">

**Author:** ![Ken\_Williams](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ken_williams/32/5289_2.png) [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)\
**Post date:** [May 22, 2025, 8:44pm UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233/12 "2025-05-22T20:44:30Z")

</div>

Ooh, reverting to 1.127.2 works for me too, thanks for looking into that @kbarros .

---

<div class="post-metadata">

**Author:** ![disberd](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@disberd](https://discourse.julialang.org/u/disberd)\
**Post date:** [May 23, 2025, 4:56am UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233/13 "2025-05-23T04:56:26Z")

</div>

The latest vscode extension was confirmed to have broken testitems also on slack

> **[Slack](https://julialang.slack.com/?redir=%2Farchives%2FC6LV2R5JB%2Fp1747148845988489%3Fthread_ts%3D1747148735.925209%26cid%3DC6LV2R5JB%26name%3DC6LV2R5JB%26perma%3D1747148845988489)**

---

<div class="post-metadata">

**Author:** ![Ken\_Williams](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ken_williams/32/5289_2.png) [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)\
**Post date:** [June 2, 2025, 7:44pm UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233/14 "2025-06-02T19:44:45Z")

</div>

Update on this issue - there’s a new version of the VS Code Julia extension released that improves testing from 1.140, but for me still has several important regressions relative to 1.127.2. See [Current pre-release does not allow to run testitems · Issue #3792 · julia-vscode/julia-vscode · GitHub](https://github.com/julia-vscode/julia-vscode/issues/3792) .

@davidanthoff might appreciate some further testing of the new release to verify whether that’s a me problem or a general problem.

---

<div class="post-metadata">

**Author:** ![MackHarry](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mackharry/32/13943_2.png) [@MackHarry](https://discourse.julialang.org/u/MackHarry)\
**Post date:** [June 3, 2025, 7:08am UTC](https://discourse.julialang.org/t/vs-code-wont-run-tests-anymore/129233/15 "2025-06-03T07:08:43Z")

</div>

Different error in the testitem controller output on the newest version (1.141.2) , but still not working: `ERROR: InexactError: convert(UInt64, -576526423290345616)`

Tracked [here](https://github.com/julia-vscode/julia-vscode/issues/3823)
