nRF Connect VSCode extension caching paths?

Hello,

I recently installed the VSCode Extension for nRF Connect and I am experiencing, what seems to me, strange behaviour. 

Here's the steps:

  1. I create a project from an example
  2. select board, the SDK, do a pristine build etc.. all good
  3. I copy the project folder to a new folder (like "Project-Copy")
  4. I open this new Folder, with the same project in it, in VSCode

Now, with this copied folder, the strangeness begins, because the extension is still referencing files, (CMakeLists.txt for example) from the old folder. I know this, because when I click on the File from the extensions "Input files", it opens the old one and editing the file in the new folder does not affect anything, only editing the old one does. It also does not seem to matter, if I delete the build folder, it still references old files, despite no path in any of the files in my project pointing to that old project folder.

Maybe I'm missing something, but this does not seem intended/desirable. 

Thank you in advance!

Parents
  • Hi Matthias,

    The problem you are experiencing is related to the fact that VS Code nRF Connect extension cannot see the newly copied folder as separate application.

    One way to solve this would be to create a new application from your folder. In VS Code nRF Connect extension go to "Applications", press "+" sign (not visible by default, hover over to see it) "Add Folder as Application". This makes your folder visible under "Applications" and content of your application should be visible to you. 

    Another way to solve this would be to go to "Add existing application" under "Welcome" inside nRF extension for VS Code. This has the same effect as previous method, adding your copied folder to the list of your applications.

    When you make an application from your folder, you might need to perform pristine build in order to see "Input files", which should then contain relevant files from your copied folder. 

    Best regards,
    Dejan

  • Hi, thanks for the quick reply.

    Unfortunately none of this worked. I can add the Application and see the Input Files of the application (which I could before as well), but clicking on the CMakeLists.txt under Input Files still opens the file in the original folder, not the new folder I have open as an Application.

    This is what it looks like. As you can see, I have the Application called spm-Kopie open, but when I click on the file, it opens it in the old folder.

    A pristine build would not do much, since it grabs the wrong file from the beginning.

  • Hi Matthias,

    Which version of VS Code and nRF Connect for Desktop are you using?

    Best regards,
    Dejan

Reply Children
No Data
Related