VSCode Julia Environment Installation Issue `Find Definition` Fails

I have a question about VSCode/Julia. I’ve already downloaded a repo from github and, in VSCode, I’ve selected the Julia environment to be the directory of the repo containing the Manifest.toml.

If I am developing within the src directory VSCode can do find definition (F12).

However, if I want to use find definition in a file that’s importing MyPackage, we run into problems. Here’s what happens in the tests/mytest.jl file if I do a find definition for MyPackage

Screen Shot 2022-06-13 at 4.15.47 PM

This confuses me because if MyPackage is installed in my Julia environment for VSCode, shouldn’t VSCode be able to run find definition anywhere the package is being used? The tutorial I’m following (Developing Julia Packages - YouTube) makes me this I shouldn’t be having this problem. However both in the tutorial and on Julia’s website (5. Creating Packages · Pkg.jl), you start by using generate to create a blank package that gets installed in your current julia environment. I’m not generating a completely blank package (I’m starting from a fully developed package) so I assume this has something to do with my issue.

My background is Python.

Well, VSCode is far from perfect… I just accept that ‘goto definition’ sometimes works and sometimes it doesn’t.

Perhaps somebody else can explain better when it is expected to work and when it is not…

Thanks :slight_smile:

I’ve looked more into it and I think it had something to do with me developing a package outside of the .julia/dev/ folder. I’ve got the tutorial working. We’ll see if I can get the other repo working.