Creating new VS Code Extension - I don't see my extension - visual-studio-code

I did yo code, the whole framework for the extension was created, in the terminal I got warning message: 'To run the extension you need to install the recommended extension 'amodio.tsl-problem-matcher'.
Then inside VS Code I did F5, then inside Extension Development Host cmd + shift + p and I can't see my default hello world command
What is going on....

Related

Visual Studio Code can not run my nim code

when i click the vscode run button it pops up with a useless dialog box instead of running the code. (i attached a screen)
running with f6 yeilds this error "A system error occurred (EINVAL: invalid argument, mkdir 'c:\0pyrhton\nimtest\C:\Users\L.nimble\bin')"
i was expecting it to compile and run the .nim file and alert me to any errors in the vscode terminal.
You need to install the nim extension, you can look for an nim extension to your liking, otherwise https://marketplace.visualstudio.com/items?itemName=kosz78.nim is an extension that can run .nim files
i think you need to install the extension.
This is point 5 in the screenshot

Vscode peek definition stops working after one/two use/s

I am using vscode version 1.51.1 e5a624b788d92b8d34d1392e4c4d9789406efe8f x64 on ubuntu version Ubuntu 20.04.1 LTS.
I am working on C code in Vscode. It has extension C/C++ (C/C++ IntelliSense, debugging, and code browsing.).
The option - peek definition works fine for the first one/two times but then goes away.
Screenshot of peek definition when working:
Screenshot of peek definition on second attempt - not working:
For now, to get the peek definition back, I have to either reload window (ctrl + shift + p -> reload window -> enter) or restart Vscode.
Any idea how to stop the feature from disappearing?
The problem persists when symlink is used to open the project in vs code. If the actual path is provided while opening the project, the plugin vscode-cpptools works correctly.
Refer link [issue on github] - https://github.com/microsoft/vscode-cpptools/issues/6280

What is the problem with my Love2D Support extension for VS Code?

I am trying to run Lua directly from VS Code. I installed the Love2D Support extension for this. But the program does not run with Ctrl+L.
Here is where Love is installed on my computer:
These are my settings for the Love2D Support extension:
I don't understand why Love is not working from VS Code with Ctrl+L.
I'm not sure what's happening in VSCode, but you can drag the folder your main.lua file is in and drop it onto LÖVE2D to run it.
The command to run Lua directly from VS Code using the LOVE2D extension is alt + L and
Not ctrl + L which selects the full line.
If the problem proceeds, make sure that LOVE is installed in Program Files because this is where the LOVE2D extension is going to look for LOVE by default.
Alternatively, you can specify LOVE's file path in the LOVE2D extension's settings.

Visual Studio Code - "Shell Command: Install 'code' command in PATH command."

Consider:
I just started with Angular. I installed angular/cli and added a project.
Now I want to use Visual Studio Code.
I open the Command Palette (Ctrl + Shift + P) and type 'shell command' to find the shell command: Install 'code' command in PATH command.
But I get this message
"No commands matching"
Why does it not exist?
With Windows it is installed by default so you don't need to add path. Just run " code . " in cmd and it will work fine
If in Visual Studio Code doesn't appear that option and the installation didn't add to the path directly, you can add the Visual Studio Code bin folder manually to the path and it starts to work.
Go to the Enviroment Variables and edit the Path user variable.
Inside of it, add a new variable with the current bin path of your Visual Studio Code installation.
Mine, for example, is "C:\Users\Inazio\AppData\Local\Programs\Microsoft VS Code\bin"
After that, you can start to use the code command in your OS
I had this same problem. Long story short, I uninstalled VS Code, re-downloaded the installer package and ran that. Sure enough, one of the install screens has a checkbox option to add to the PATH variable and this option is unchecked by default.
Checked the box, finished the install, works fine.
Of course it's perfectly valid to modify the PATH variable after install, but I think it's important to clarify that (at least version 1.23.0) does not update PATH by default. Most of the threads I looked at says it does.
I fixed this just adding "C:\Users\myUser\AppData\Local\Programs\Microsoft VS Code\Code.exe" (where myUser is your windows user) without "" to system path.
same effect than " Shell Command: Install ‘code’ command in PATH ".
This works for me
For Windows users
Open Environment Variables
System > Advance system settings > Advanced tab > environment variables on system variables click on Path and click Edit and add new Path named
"C:\Users\Your-Username\AppData\Local\Programs\Microsoft VS Code\bin"
For window users follow steps below and add new Path, after doing so restart your terminal you will get code command on your terminal
If you already have Visual Code into Windows path and in a terminal you put "code ." and Visual Code starts, what happens is that the command "code" is not linked to the path in wsl2.
All you have to do is run the following command changing your user:
sudo ln -s /mnt/c/Users/CHANGE_USER/AppData/Local/Programs/Microsoft
VS\ Code/bin/code /usr/bin/code
This works on Ubuntu and Debian.
it is already installed on Windows. You just have to make cmd path where the project created (e.g C:\WINDOWS\system32> cd C:\WINDOWS\system32\hello-world), then run the the comamnd "code ." like this (C:\Windows\System32\hello-world>code .)
I got this from VS Code documentation
the path has been set automatically when installing VS.But i noticed a difference between "code." and "code ." Can you see the difference? The second has space in between the code and the dot. Try that.
I was having the same exact problem and when i checked my PATH variable it said that the path was something\something\Microsoft VS Code . then i remembered my folder's name was Visual Studio Code.After I renamed it back everything works.
Go to Extensions and install Shell. On newer versions you can just type in Code . in CMD and it will pop-up.
Just open your command prompt and type:
cd hello-world
hello-world is the project name don't forget to change it then click (enter) and type
code .
Visual Code already have internal terminal window
Use the Ctrl+` keyboard shortcut with the backtick character.
Its supports all Ubuntu terminal commands

VSCode run ruby file from terminal

The VSCode python extension has a feature to right click and run a file from the terminal. Is there a way that I can use a similar feature to quickly execute a ruby file from the terminal? Perhaps a hot key to start a new terminal session and run the current file within the ruby install directory.
You can install the code-runner package opening the command palette:
command + shift + p (Mac)
control + shift + p (Windows/Linux)
Find and install it:
ext install code-runner
Then it'll ask you to reload the window, and depending which file type you're working in, you can type the ctrl + alt + n keybinding and your file output will be in the output tab.
Keep your Ruby code saved inside .rb extension file
And in the terminal run
ruby file_name.rb
Example:
ankita#ankita-Inspiron-5559:~/Ruby_asignment$ ruby prob_sol1.rb