why there is no selection when I click F5 to run program in vscode - visual-studio-code

In the begin, for example, I'd like to run program by click F5, and there is a selection box on the top of vscode. However, maybe I click some errorly, it debug directly, and no selection here, and the terminal shows (base) in the front of result, why and how to correct to original setting?

One way to reset VS settings as follows:
Note: Please use save as to backup settings.json in case you have something that you may need to restore later.
DO NOT DELETE ANYTHING FROM YOUR "defaultSettings.json"
These instructions are only for clearing out everything except {
} within your user settings.json:
The easiest way to reset VS Code
back to the default settings is to clear your user settings.json file
contents in the Settings editor. Delete everything between the two
curly braces, save the file, and VS Code will go back to using the
default values.How can I reset my user settings?
If following above does not resolve your issue, please consider adding a screenshot of the issue along with your posted question and/or add default settings.json, so it can be compared with a working default settings.json file for your assistance.

Related

How do you reset an extension's settings in vscode?

I was trying to do some custom settings for the C++ and CMakeTools extensions. But now I want to reset/revert everything to defaults. How do I do that?
I tried uninstalling the extensions and re-installing, and they got re-installed with my custom settings wtf.
I see no reset buttons in the UI
I don't know where the per-extension settings are stored on my computer.
What am I not understanding? Why is this so unobvious?
As described in this feature request, you cannot do this directly. However, you can open your settings.json file and find the extension settings, then manually remove them.
Keep in mind, removing the extension won't remove its settings. So reinstalling the extension will not reset it at all, but keep your previous configuration.
There's a Settings tab (and apparently extension settings can be both in the User subtab and the Workspace subtab).
There's User, Workspace, and Default settings.json's which you can open from Ctrl+Shift+P, start typing "settings.j", and see the 3 suggestions (the user settings file is located at C:\Users\{USER_NAME}\AppData\Roaming\Code\User\settings.json (see docs for all OS paths).
Compiler settings are in c_cpp_properties.json, Compiling settings are in tasks.json, Debugging settings in launch.json. These are in your project folder under the .vscode folder, and you can search them in Ctrl+Shift+P (but don't write .json at the end or it won't show up).
Also check your system environment variables for "CXX" and "CC" env variables which can also overwrite the compiler (and the ui says nothing about this).
Apparently there's no way to reset all settings (the "permanence" is a giant source of ux confusion, a meme decision in my professional opinion).
Luckily you can just go to Settings and write #modified to see all the settings you've changed!
Ok, so to finally answer: HOW do you RESET an individual setting?
This cannot be "googled": There's an invisible hover hitbox on the left side leading to a hidden settings gear (red dotted line):
This ux is the source of the problem.
In VSCode, "removing"/"deleting" a setting means "resetting" it. Your settings are just "overwritings". So all auto-defaults should pop back into the UI after a VSCode restart, I hope. (also the aforementioned .vscode settings / env vars / build folder might still override)

How to remove warning text beside my code in Flutter's Visual Studio Code

I am a new Flutter learner, and this is kinda annoy me, I think the "Problems" tab under is fully understand, I don't want to see warning next to my code. Is there a way I can disable or hide it? Thank you.
Hey, In visual studio code you can do minute changes.
Step1:
Press ctrl+shift+p , a command pallet will open
Step2:
Type settings.json and click on Open Settings (JSON)
a file will open
step3:
Add this lines in that
"editor.codeActionsOnSave": {
"source.fixAll": true
}
**After this whenever you save, const will be added automatically.
Note: Sometimes you might get error because after saving some widgets are prefixed with const but, sometimes when your values in widget get dynamic, there will be a error, so be careful.
disable this line or add source.fixAll to config.json
Perhaps you are using some vscode plugin like https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens to show code diagnostics.
Though that feature seems very useful to me incase you find that annoying you may disable it by going through your list of extensions.

Set VS Code to always open a new window on launch

I am trying to automate some of my workflow using RPA (UiPath). I want to set my VS code so that it will consistently open to the new screen without a folder selected when I launch it, but I can't find how to do this in settings.
^^^ The screen I want to open each time ^^^
Does anyone know how to set this?
Add the following two settings into your vscode settings.json:
"workbench.startupEditor": "welcomePageInEmptyWorkbench",
"window.restoreWindows": "none",
^ Alternatively you can set the above settings from settings UI menu too.
This would ensure that you get the welcome page when opening an empty workbench. If in all cases you'd like to show welcome page then set it like so: "workbench.startupEditor": "welcomePage".
Important note
If you had opened a folder/workspace from command line in vscode, like say code ~/dev/myProj, then that session will always be persisted during restart of vscode. That's just how vscode works. So inorder to make the above settings work, you have to open the folder/file from vscode command palette(Ctrl+Shift+P) rather than from command line(or terminal).

How to hide the highlighted lines when the ".sql" file are opened in VSCode

Below is what it looks like when opened the ".sql" file, I want to hide those highlighted lines
I'm the creator of VSCode-sqltools. In fact as #joao-caxias mentioned, that was intentional. But some users didn't like it at all, so I've added a setting to enable/disable that behavior called sqltools.highlightQuery so you should be able to remove that if you want now.
I have found out that it comes with the SQL Tools extension
You could either uninstall it or revert back to 0.21.9 version. Not sure where the root cause for highlighting is.
You can go to SQLTools and click on the setting button. Then search highlight and uncheck the button for this setting.

vscode "applying code action organize Imports"

Currently got an annoying issue with VS and saving ts files.
every time I save a ts file I get a little popup in the bottom right telling me its "applying code action organize Imports".
I've tried uninstalled VSCode, removing all extensions, deleting the code folder in Roaming. As far as I can tell all my user settings are blank and it should be back to a clean install of VSCode. I've tried looking in the settings for something similar, even adding this to my settings.
{
"editor.codeActionsOnSave": {
"source.organizeImports": false
}
}
However, I'm still getting the same message on save and its restructuring the imports.
I've got vs code installed on another 2 machines and don't get the same issue.
Any ideas?
Turns out the folder I was opening had its own custom .vscode folder with its own settings.json which had the organizeImports setting enabled. So no matter what I did to my local settings file this one was always overriding it and nothing was showing up within VS directly.
I had forgotten to select a Python interpreter in vscode. Once I did this, the pop up on bottom right telling saying its "applying code action organize Imports" stopped appearing. This solved it for me.