# Why doesn't the VS Code Julia Extension jump to definitions for Standard Library types, when it will jump to definitions for installed packages?

**URL:** <https://discourse.julialang.org/t/why-doesnt-the-vs-code-julia-extension-jump-to-definitions-for-standard-library-types-when-it-will-jump-to-definitions-for-installed-packages/123616>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [December 9, 2024, 12:57pm UTC](https://discourse.julialang.org/t/why-doesnt-the-vs-code-julia-extension-jump-to-definitions-for-standard-library-types-when-it-will-jump-to-definitions-for-installed-packages/123616 "2024-12-09T12:57:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![world-peace](https://avatars.discourse-cdn.com/v4/letter/w/9f8e36/32.png) [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Post date:** [December 9, 2024, 12:57pm UTC](https://discourse.julialang.org/t/why-doesnt-the-vs-code-julia-extension-jump-to-definitions-for-standard-library-types-when-it-will-jump-to-definitions-for-installed-packages/123616/1 "2024-12-09T12:57:58Z")

</div>

I am doing some tests with Julia and VS Code to try and figure out why the Julia Extension doesn’t seem to be able to find definitions for some functions.

I wrote a short test file containing the following contents.

```julia
using Dates
using Base64
using DataFrames
using CSV

function (@main)(args)
    println(Dates.today())
    println(Base64.base64encode("helloworld"))
end

```

I opened this with Visual Studio Code. I can run it from the terminal by running

```julia
$ julia MyPackage/src/MyPackage.jl

```

The Julia environment, both within VS Code, and for the Julia process used to run `MyPackage.jl` is set to `v1.11` / `(@v1.11) pkg>`.

If I hold down `CTRL` and hover over `DataFrames` or `CSV`, I am able to jump to the definitions of those modules.

For example, in the case of `CSV`, left clicking while holding `CTRL` opens

```julia
/home/user/.julia/packages/CSV/XLcqT/src/CSV.jl

```

Why _ **doesn’t** _ this work for the standard library packages such as `Dates` and `Base64`?

Is it expected to work? Does it work for anyone else?

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [December 9, 2024, 2:10pm UTC](https://discourse.julialang.org/t/why-doesnt-the-vs-code-julia-extension-jump-to-definitions-for-standard-library-types-when-it-will-jump-to-definitions-for-installed-packages/123616/2 "2024-12-09T14:10:23Z")

</div>

I think that stdlibs should be expected to work like external packages in most regards (except that they are shipped with Julia itself so you don’t have to download them).  
See also this discussion:

> [@For which packages does VSCode autocomplete work?](https://discourse.julialang.org/t/for-which-packages-does-vscode-autocomplete-work/101360):
>
> I recently discovered that autocomplete (and more generally IntelliSense) works for some people, and that makes me very frustrated rofl For me it only works with Base and Core, not even standard library stuff like LinearAlgebra. EDIT: see [this reply](https://discourse.julialang.org/t/for-which-packages-does-vscode-autocomplete-work/101360/4) for the real question. I’m on macOS Ventura with the latest version of Julia and VSCode. I did wait until IntelliSense finished loading. Related GitHub issues: [Autocomplete for non-built-in packages? · Issue #1885 · julia-vscode/julia-vscode ·…](https://github.com/julia-vscode/julia-vscode/issues/1885)

---

<div class="post-metadata">

**Author:** ![world-peace](https://avatars.discourse-cdn.com/v4/letter/w/9f8e36/32.png) [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Post date:** [December 9, 2024, 2:49pm UTC](https://discourse.julialang.org/t/why-doesnt-the-vs-code-julia-extension-jump-to-definitions-for-standard-library-types-when-it-will-jump-to-definitions-for-installed-packages/123616/3 "2024-12-09T14:49:06Z")

</div>

Did you have do to anything special to get it to work with the standard library packages?

I’m confused as to why I can’t jump to the definition of `using Dates`. It seems like your linked thread suggests this _ **should** _ work?

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [December 9, 2024, 4:22pm UTC](https://discourse.julialang.org/t/why-doesnt-the-vs-code-julia-extension-jump-to-definitions-for-standard-library-types-when-it-will-jump-to-definitions-for-installed-packages/123616/4 "2024-12-09T16:22:30Z")

</div>

I think it depends in which environment Julia thinks you are in VSCode. And if you have selected `@v1.11`, you may need to explicitly add `Dates` to it (even though you can load it without that because it happens to be a stdlib)

---

<div class="post-metadata">

**Author:** ![world-peace](https://avatars.discourse-cdn.com/v4/letter/w/9f8e36/32.png) [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Post date:** [December 10, 2024, 7:45am UTC](https://discourse.julialang.org/t/why-doesnt-the-vs-code-julia-extension-jump-to-definitions-for-standard-library-types-when-it-will-jump-to-definitions-for-installed-packages/123616/5 "2024-12-10T07:45:49Z")

</div>

Good suggestion - I did wonder this myself and already tried it. Let me see if having restarted VS Code if this makes any difference

Edit: Just tried and it’s the same… any other ideas?

---

<div class="post-metadata">

**Author:** ![world-peace](https://avatars.discourse-cdn.com/v4/letter/w/9f8e36/32.png) [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Post date:** [December 10, 2024, 1:09pm UTC](https://discourse.julialang.org/t/why-doesnt-the-vs-code-julia-extension-jump-to-definitions-for-standard-library-types-when-it-will-jump-to-definitions-for-installed-packages/123616/6 "2024-12-10T13:09:55Z")

</div>

Just a thought - how did you install Julia? I used `juliaup`. Someone else I know used a snap package. This works for them, but not for me.

For example, for me `Dates.jl` is in this directory:

```julia
/home/user/.julia/juliaup/julia-1.11.2+0.x64.linux.gnu/share/julia/stdlib/v1.11/Dates/src/Dates.jl

```

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [December 10, 2024, 2:00pm UTC](https://discourse.julialang.org/t/why-doesnt-the-vs-code-julia-extension-jump-to-definitions-for-standard-library-types-when-it-will-jump-to-definitions-for-installed-packages/123616/7 "2024-12-10T14:00:31Z")

</div>

I installed it with juliaup too, but I don’t think that’s the issue. However, VSCode autocompletion has always been a bit of a mystery to me, so I’m afraid my knowledge ends at the post I linked above ^^

---

<div class="post-metadata">

**Author:** ![world-peace](https://avatars.discourse-cdn.com/v4/letter/w/9f8e36/32.png) [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Post date:** [December 10, 2024, 2:04pm UTC](https://discourse.julialang.org/t/why-doesnt-the-vs-code-julia-extension-jump-to-definitions-for-standard-library-types-when-it-will-jump-to-definitions-for-installed-packages/123616/8 "2024-12-10T14:04:04Z")

</div>

Ok thanks, this is still useful information.
