# VS Code Julia:Execute File workflow

**URL:** <https://discourse.julialang.org/t/vs-code-julia-execute-file-workflow/42145>\
**Category:** General Usage\
**Created:** [June 27, 2020, 4:40am UTC](https://discourse.julialang.org/t/vs-code-julia-execute-file-workflow/42145 "2020-06-27T04:40:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pauljurczak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pauljurczak/32/921_2.png) [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Post date:** [June 27, 2020, 4:40am UTC](https://discourse.julialang.org/t/vs-code-julia-execute-file-workflow/42145/1 "2020-06-27T04:40:38Z")

</div>

I have this test file:

```julia
include("simc.jl")
using .Simc
push!(Base.DL_LOAD_PATH, pwd())

function f()
  println(say42())
end

f()

```

The library I’m loading is defective, but when I run the whole file with `Julia:Execute File` I’m only getting a blank line response in REPL. When I execute just `f()`, I get proper error message:

```julia
julia> f()
ERROR: could not load library "libsimc.so"

```

What is the proper workflow or test file structure in order to get all error messages when using `Julia:Execute File`?

**EDIT**

Instead of convoluted example above, this simple file behaves the same way:

```julia
function f()
  error("some error")
end

f()

```

producing a blank line when run with `Julia:Execute File`. When I run it (`err.jl`) with REPL:

```julia
julia> include("err.jl")
ERROR: some error

```

it behaves as expected. Is there a reason for `Julia:Execute File` to behave differently than `include()`?

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [June 27, 2020, 6:12am UTC](https://discourse.julialang.org/t/vs-code-julia-execute-file-workflow/42145/2 "2020-06-27T06:12:55Z")

</div>

Could you open an issue? This sounds like a bug. You could just link to this post for the details.

---

<div class="post-metadata">

**Author:** ![pauljurczak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pauljurczak/32/921_2.png) [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Post date:** [June 27, 2020, 6:19am UTC](https://discourse.julialang.org/t/vs-code-julia-execute-file-workflow/42145/3 "2020-06-27T06:19:22Z")

</div>

Done: [https://github.com/julia-vscode/julia-vscode/issues/1414](https://github.com/julia-vscode/julia-vscode/issues/1414)
