VSCode 'Add Build Configuration' fails - blank window

My installation of VSCode on Linux Mint has never worked properly.  I am able to open an existing application however the "Add Build Configuration" window is blank, for example:

As I said, this has "never worked".  Originally, when I installed VSCode (and NRF Connect etc) my computer was running Linux Mint 20.  It did not work, however at that time I believe I discovered that it was not supported by Mint-20 or by the related version of Ubuntu, so I never pursued it at the time.

Since then I have upgraded to Mint 21.2, which is based on Ubuntu 22.04, which is indicated to be supported at "Tier 3".  This has not fixed the problem.

I have tried uninstalling and reinstalling VS-Code, and the NRF Connect extensions inside VS-Code - this has not helped.

Thoughts, suggestions of where I might look for some clues...?

Parents
  • Hi,

     

    Have you installed vscode + extensions manually, or used the toolchain manager from nRF connect sdk for desktop?

    I've noticed that sometimes it is important where you open vscode from for it to inherit your environment correctly, especially if using different distros than stock Ubuntu.

    Try to open up a terminal and run vscode (default path: /usr/share/code/bin/code) and see if this then behaves differently. If it still misbehaves, could you share a detailed log (ie. code --verbose) ?

     

    Kind regards,

    Håkon

  • Hello Håkon, thank you for the suggestions.

    I am not 100% sure how I originally installed things, it was a while ago.  I *THINK* I used nRF Connect for Desktop "toolchain manager" to install the SDK, and I think I manually installed vscode.  Before opening this ticket, I un-installed vscode and I then installed it through the operating system's software repository ("synaptic")

    Thank you for the suggestion of running "code --verbose" from the command line.  My gosh it sure is verbose(!!).  Here is the initial spewage:


    After starting "code" and the log messages settled down, I clicked on "+ create new build configuration" and got the same blank page; here are the messages it created:

  • Hi,

     

    Your first log shows several errors:

     

    And further down, it seems that the /home/dmc/.config/Code directory is not setup properly, or has permission issues? You're getting "ENOENT" in most vscode configuration:

     

    Code also has problems resolving what shell is running on your system:

     

    This one should return:

     

    When you uninstalled vscode, did you also delete ~/.config/Code directory?

     

    Kind regards,

    Håkon

  • Thanks for your help so far.  Please let me know what I should do/try next.

    I did not delete ~/.config/Code when I did the previous run.  I will now do this....

    I have now completely uninstalled "code", which however still left ~/.config/Code (which BTW is mode 775).  So, I got rid of ".config/Code" and then reinstalled "code".  Same problems as far as I can tell (no more, no less):

    • resolveShellEnv(): skipped (VSCODE_CLI is set)
      • still happening.  What might I do to fix this?
    • [689433:1220/101402.357820:INFO:CONSOLE(643)] "%cTRACE color: #888 Error while resolving configuration file 'file:///home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/settings.json': Unable to read file '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/settings.json' (Error: Unable to resolve nonexistent file '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/settings.json')", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
      • However, ..."hello_world" is mode 775 and ".vscode" does not exist.  So there's nothing stopping ".vscode" from being created, but it isn't being created
    • "+ create new build configuration" page is still blank.

    Messages from a new run of "code --verbose", with freshly-reinstalled "code" and with freshly-created ~/.config/Code...  I don't think there is any meaningful change or improvement?

  • Hi,

     

    Is your home dir a symbolic link to /a2/ directory?

     

    You might be running into problems with that, as discussed in the comments and linked issues here:

    https://github.com/microsoft/vscode/issues/143034

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    Is your home dir a symbolic link to /a2/ directory?

     

    You might be running into problems with that, as discussed in the comments and linked issues here:

    https://github.com/microsoft/vscode/issues/143034

     

    Kind regards,

    Håkon

Children
  • Hello Håkon, sorry for my delay replying - so: a very Happy New Year to you and your co-workers!! ;-)

    Darn it, a symlinked home directory does indeed seem to be the cause of the problem.  Yes my home directory was a symlink.  Total respect for figuring that one out (!!!)

    I have now solved (actually, worked-around, grumble-grumble) the problem.

    If it helps anybody else, here is what I now know about what works and what does not work.  I can make the problem appear or disappear depending on the directory ".vscode" in my home directory:

    • If my home directory is a symlink, then things fail
    • If my home directory is a real directory, and everything in it is a symlink except for ".vscode", then things work.