I followed the Docs of 'https://code.visualstudio.com/docs/cpp/config-clang-mac'
In the form step exist no error, but when i chose Run > Add Configuration... and then choose C++ (GDB/LLDB), error exists"Cannot read property"
it's a step to edit launch.json file
I also got this on Windows using WSL with a Debian host. I think there is a bug, but it's easy to overcome.
Create a new launch.json file under the .vscode directory by right-clicking and selecting 'new file.'
Paste in the launch.json contents from this page: https://code.visualstudio.com/docs/cpp/config-wsl
Make sure that 'preLaunchTask' matches your build task name from tasks.json, that you have the appropriate debugger installed, etc.
It should now work.
Related
enter image description here
Can anyone say how to debug it
It seems like your kotlin directory is not added to your PATH variable thus the extension/terminal may not know what to execute, when trying to execute kotlinc.
The easiest way to resolve this issue is by adding the path to your kotlin directory (path/to/your/kotlin/bin) to your PATH variable
(see here), if you are on windows, or here, if you are on a linux system.
You can check, if it works by opening a command line window and trying to execute
kotlinc -version
However, as it seems like you are using Code-Runner extension in vscode, you can also update your settings.json file:
reference here.
I want to use the sqlfluff extension (extentsion id dorzey.vscode-sqlfluff) in vs code. When I save a sql file I get the following error message in vs code:
"Cannot lint /home/usr/file.sql. The executable was not found. Use the 'Executable Path' setting to configure the location of the executable."
I followed the extensions configuration doecumentation which states:
"The extension expects sqlfluff to be installed and already added to the path. If it is installed but cannot be found, add the path to your preferences as seen below. Find the path by typing which sqlfluff into your terminal."
However, which sqlfluff doesn't print the path in the terminal. Any help is appreciated!
To specify a custom path to sqlfluff in VS Code,
Open a command prompt and run python -c "import shutil; print(shutil.which('sqlfluff'))" This will print out the path to your local sqlfluff installation.
Copy the path that is printed out. It should end in "sqlfluff.EXE"
In VS Code, click File --> Preferences --> Settings
Find the setting for "Sqlfluff: Executable Path". Paste the path there.
vscode-sqlfluff does not install sqlfluff itself. You have to install it by yourself.
Follow sqlfluff installation guide
I see a lot of posts asking how to open VScode from the command line; I have the opposite problem!
When a type a file name from the CMD terminal, VSCode is launched with the file contents...why is that? I don't want that to happen! Any ideas on how to stop this from happening?
Maybe you should check your environment variables and find path for VScode, then delete it
Also maybe in your file properties VScode is set to default opening app , so it open files by default
For example (In my case Intellij IDEA) it looks something like this:
this mean you should go to properties and change "opens with" options
Thanks for the hints; they both helped on solving the problem.
The one particular file that I wanted to execute and NOT open with vscode is a bash script file with extension " .sh ".
I checked the file manager and it is not associated with vscode; instead, it says "SH Source File".
Then, I followed the link to thisdavej and after seeing the proposed registry entries, I went ahead and looked into my own registry...found that the .sh extension had an "OpenWithProgids/VSCode.sh", deleting that solved my problem. Now, when I type the name of the shell script, it actually executes.
Thanks.
I am using visual studio code for develop my react application. I just wanted to open the project in the IDE using CLI, using "code ." command. Although it was perfectly working previously, now shows an error as below.
'code' is not recognized as an internal or external command,
operable program or batch file.
Can someone help me out to solve this matter?
This sounds like an issue with your environment variables rather than a problem with VS Code itself.
When you run the code command in Windows Command Prompt (cmd), Windows searches all commands on your path for one named code, and executes that command. VS Code installs a command with this name that opens the editor, normally located here on Windows:
C:\Program Files\Microsoft VS Code\bin
It may be that your path no longer contains this particular directory for some reason.
You can edit your path directly to add it:
From the Start menu, type "variables" and choose the option to "Edit environment variables for your account".
Locate the PATH entry and edit it.
Add the directory where the code command exists, e.g. C:\Program Files\Microsoft VS Code\bin.
The path editor may appear slightly different depending on what version of Windows you are running.
My case was different rather than general solution for this question. I saw that the number of solutions which says the probelm exists with the environment valriables. In the new release it provides a setup file only.
Before downloading, there are certain properties to be selected.When I just redownloaded the set up and run it , it starts working perfectly.
When I try to edit a file in visual studio code, I type the command 'code filename.ps1' and the code used to automatically open as a second tab in the editor.
Now, when I do the same thing, it opens in a new window. I have not changed anything in my settings and I can't find an associated Preference that controls this.
Anyone know exactly the default setting that I need to look at?
According to CLI Options this should work:
code -r filename.ps1
>
-r or --reuse-window
Forces opening a file or folder in the last active window.