# Include files not showing function docstrings in VScode

**URL:** <https://discourse.julialang.org/t/include-files-not-showing-function-docstrings-in-vscode/94885>\
**Category:** New to Julia\
**Tags:** question, code-organization\
**Created:** [February 19, 2023, 5:11pm UTC](https://discourse.julialang.org/t/include-files-not-showing-function-docstrings-in-vscode/94885 "2023-02-19T17:11:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Droolia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/droolia/32/46667_2.png) [@Droolia](https://discourse.julialang.org/u/Droolia)\
**Post date:** [February 19, 2023, 5:11pm UTC](https://discourse.julialang.org/t/include-files-not-showing-function-docstrings-in-vscode/94885/1 "2023-02-19T17:11:48Z")

</div>

My goal is include the structs, functions, etc. of another .jl file into the new.jl.

I have been using the include(“foo.jl”), it works but it doesn’t feel right. For example, my function docstrings do not appear in new.jl when the mouse is hovering over them, but they do in the source files I created. I see that when importing or ‘using’ julia packages, they are able to show docstrings of functions outside of the source file.

Can someone send me a best practices for this? I want to get this straight before I have dozens of files. I have read some things about making my code into modules or packages, but I don’t understand that as of now (but I’m trying).

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [February 19, 2023, 5:30pm UTC](https://discourse.julialang.org/t/include-files-not-showing-function-docstrings-in-vscode/94885/2 "2023-02-19T17:30:59Z")

</div>

> [@Droolia](#):
>
> mouse is hovering over them

Are you talking about VS Code? You might want to mention that in the title.

---

<div class="post-metadata">

**Author:** ![Droolia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/droolia/32/46667_2.png) [@Droolia](https://discourse.julialang.org/u/Droolia)\
**Post date:** [February 19, 2023, 6:21pm UTC](https://discourse.julialang.org/t/include-files-not-showing-function-docstrings-in-vscode/94885/3 "2023-02-19T18:21:19Z")

</div>

Thanks, updated

---

<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:** [February 19, 2023, 8:43pm UTC](https://discourse.julialang.org/t/include-files-not-showing-function-docstrings-in-vscode/94885/4 "2023-02-19T20:43:21Z")

</div>

I do see the docstrings (see screenshot), although I had to wait some seconds for VS Code to load them.

![imagen](https://global.discourse-cdn.com/julialang/original/3X/d/2/d23789772903d5237049f461148df5b25dabe0aa.png)

---

<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:** [February 19, 2023, 8:50pm UTC](https://discourse.julialang.org/t/include-files-not-showing-function-docstrings-in-vscode/94885/5 "2023-02-19T20:50:54Z")

</div>

Nevertheless, if you want to use modules, it’s as easy as enclosing the code of `foo.jl` in a module as follows:

```julia
module Foo # use any name you want
# here your code of foo.jl
end

```

But now, in the file where you `include("foo.jl")`, what you have defined is the module `Foo`, not its “contents” directly, so if for instance one of those contents is the function `foo`, calling `foo()` from “outside” won’t work. You must specify `Foo.foo()`, etc.

There are ways to export names from the modules, just as packages do (since actually, packages are essentially modules). But I’ll stop here, to keep it simple.

---

<div class="post-metadata">

**Author:** ![Droolia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/droolia/32/46667_2.png) [@Droolia](https://discourse.julialang.org/u/Droolia)\
**Post date:** [February 20, 2023, 5:53pm UTC](https://discourse.julialang.org/t/include-files-not-showing-function-docstrings-in-vscode/94885/6 "2023-02-20T17:53:55Z")

</div>

I see the discrepancy now. Thank you for your help, your examples reminded me of something different that I’m doing.

I am using the below code to include, because I move across several PCs during my development.

```julia
include(joinpath(pwd(), "foo\\foo.jl"))

```

I changed it back to a fixed string, and the docstrings came back.

```julia
include("C:/Users/julia/foo/foo.jl")

```
