# Opening a file in VS Code

**URL:** <https://discourse.julialang.org/t/opening-a-file-in-vs-code/78642>\
**Category:** New to Julia\
**Tags:** vscode\
**Created:** [March 29, 2022, 12:44am UTC](https://discourse.julialang.org/t/opening-a-file-in-vs-code/78642 "2022-03-29T00:44:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chadagreene](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chadagreene/32/34924_2.png) [@chadagreene](https://discourse.julialang.org/u/chadagreene)\
**Post date:** [March 29, 2022, 12:44am UTC](https://discourse.julialang.org/t/opening-a-file-in-vs-code/78642/1 "2022-03-29T00:44:27Z")

</div>

I’ve just installed a Julia package, and now I’d like to open one of its functions to see how it works.

In Matlab, if a function is anywhere in the file path, I could open it via

```julia
open myfunction.m

```

or I could specify the directory with something like

```julia
open Users/myname/path/to/myfunction.m

```

Is there an equivalent Julia command to open a file from the REPL?

Another way to open files in Matlab is to navigate to them in the Current Folder window and double-click on the file. In the Julia workspace in VS Code I’m _expecting_ to be able to double click on these Julia functions to open them, but when I try, nothing happens:

 ![Screen Shot 2022-03-28 at 5.37.57 PM](https://global.discourse-cdn.com/julialang/original/3X/5/2/520f2ff042aff6e42010e825f48c2edd6d00807d.png)

I feel like I must be missing something obvious–Is there a way to open Julia functions?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [March 29, 2022, 5:45am UTC](https://discourse.julialang.org/t/opening-a-file-in-vs-code/78642/2 "2022-03-29T05:45:25Z")

</div>

`@edit myfun(x)` will (usually) take you to the definition of a method.

---

<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:** [March 29, 2022, 9:56am UTC](https://discourse.julialang.org/t/opening-a-file-in-vs-code/78642/3 "2022-03-29T09:56:20Z")

</div>

[https://github.com/julia-vscode/julia-vscode/pull/2815](https://github.com/julia-vscode/julia-vscode/pull/2815)

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [March 29, 2022, 11:09am UTC](https://discourse.julialang.org/t/opening-a-file-in-vs-code/78642/4 "2022-03-29T11:09:24Z")

</div>

The screenshot does not show the file explorer, but the Julia workspace (objects in the current session). click on the top icon of the left sidebar ( the one marked with “1” in your screenshot).
