Libraries available to wsl not to vscode on windows - visual-studio-code

So I was doing gpu programming using cuda and had installed the same for my wsl on windows. So the code I wrote works on wsl, printing the correct output. But the libraries such as bits/stdc++.h and sys/time.h cant be found by vscode. Why doesnt my wsl not produce any errors and how to correct this?
compiling on wsl using nvcc
libraries cant be found
So I am thinking of adding the requierd libraries to micrososft visual studio folder in program files. But I am unable to get the files for sys/time.h. Did I do some error while installing the libraries? I have Microsoft visual studio version 2022.

Related

I'm using ROS noetic over wsl in Windows 11, but rospy library is not loaded in VS code

This is the error I get through the terminal, I wonder if vs code and ros are not integrated vs code because I installed it through windows
To work properly with VSCode you need to install the ROS VSCode extension. The wiki also currently has an entry for VSCode support.

vscode inside WSL vs Windows

In tutorial requirement is install vscode in windows and install Remote Development extension pack. Why not just install in wsl?
I've install vscode to wsl. When I run code in wsl I get message:
To use Visual Studio Code with the Windows Subsystem for Linux, please install Visual Studio Code in Windows and uninstall the Linux version in WSL. You can then use the `code` command in a WSL terminal just as you would in a normal command prompt.
Do you want to continue anyway? [y/N]
To no longer see this prompt, start Visual Studio Code with the environment variable DONT_PROMPT_WSL_INSTALL defined.
Which cons of run vscode in wsl as opposed to run it in Windows?
The WSL extension splits VS Code into a “client-server” architecture, with the client (the user interface) running on your Windows machine and the server (your code, Git, plugins, etc) running "remotely" in your WSL distribution.
When VS Code is started in WSL, no shell startup scripts are run.
The extension runs commands and other extensions directly in WSL so you can edit files located in WSL or the mounted Windows filesystem (for example /mnt/c) without worrying about pathing issues, binary compatibility, or other cross-OS challenges.
(source: MSFT DOCUMENTATION)
This is the architectural choice of Windows and - personally speaking - I feel like it's a choice to avoid conflicts and redundancies.
When running the WSL extension, selecting the 'Extensions' tab will display a list of extensions split between your local machine and your WSL distribution.
Installing a local extension, like a theme, only needs to be installed once.
Some extensions, like the Python extension or anything that handles things like linting or debugging, must be installed separately on each WSL distribution. VS Code will display a warning icon ⚠, along with a green "Install in WSL" button, if you have an extension locally installed that is not installed on your WSL distribution.

How do I make vscode c++ intellisense work with remote development?

When running vscode locally on windows I can install the C/C++ extension and immediately have some code understanding from the editor (visual studio 2019 is installed too):
However after installing OpenSSH and connecting to the same PC via the vscode Remote Development extension (connecting from linux to Windows) this doesn't work:
Everything I hover over says: Unsupported Markup content received. Kind is:
Also typing msg.<ctrl+space> gives No suggestions.
The only references I can find are:
https://github.com/redhat-developer/vscode-xml/issues/43
https://github.com/TypeFox/monaco-languageclient/pull/103/files#diff-fde961a63820de2855135d552feaef126f4624fa959efbe848c112a5fb04e4a5R180
These don't seem related. I have not set up a c_cpp_properties.json but then I didn't need to for the local test that worked. The error makes me think there is some conflicting extension, but I've uninstalled most others and the issue persists. What have I missed?

Ballerina with Visual Studio Code

I am struggling to get Ballerina working with Visual Studio Code (on Windows 10).
It is installed and works fine from Command Prompt, however it cannot complete build command in Visual Studio Code. It does not seem to be able to finish build command effected via Visual Studio Code. I have Ballerina extension for Visual Studio Code installed.
Does anybody had similar problems and know how to overcome it?
Bellow please find details of versions:
Ballerina 1.2.1
Language specification 2020R1
Ballerina tool 0.8.5
VSC:
1.44.2
Ballerina extension for Visual Studio Code
Windows:
10 Pro
Version 10.0.18362
#GregorSind, try quitting the VSCode instance and then reopen. This might be that the environment variables are not being visible to the VSCode instance. Also, check what's the integrated shell of VSCode

Can't launch VS Code from Windows Terminal inside WSL 2

I installed VS Code using the Scoop package manager.
I get this error when launching VS Code from Windows Terminal, inside WSL 2:
My theory is that the error is caused because I used Scoop instead of the regular installer.
Should I use the regular VS Code installer from their website or can this error be fixed?
OK, so I uninstalled VS Code using Scoop and installed the regular installer from the VS Code website and now it works.
Seems the problem is with the Scoop VS Code installer.