I'm looking to move over to vs code from visual studio.
Is it possible to have a different settings.json per configuration, similar to the way visual studio has properties per configuration (Release, Debug etc).
It appears this behaviour is available in the C++ extension configuration (c_cpp_properties.json) and the configuration is selectable in the status bar, however this is separate from the launch.json and other settings.
My goal is to be able to select configuration and have a different vscode and extension settings loaded.
Related
Can't Open Settings.json file in Windows tried using Files --> Preferences but I can't see Preferences in windows.
I also tried with command pallette not able to see it either. I am using Visual studio code 2022
I want to open settings.json to set ESLINT as the default formatter
The issue was because I was using Visual Studio instead of Visual Studio Code
Can the unity External script editor be extended to open up different extensions with different editors?
I want to use vscode to open .shader files, while I want CSharp scripts to use Visual Studio. With the External script editor I can only set one editor for all extensions.
I had this question myself, and I found a workaround. Not the solution I was hoping for, but still good enough for me.
You can set Visual Studio as the main editor for all extension in Unity. Then, from Visual Studio, you can set the .shader extension to be edited by default using Visual Studio code.
To do this:
Go in Unity -> Edit -> Preferences -> External Tools and set External Script Editor to Visual Studio. I also ticked all the tickboxes to make sure all files were generated; this is useful because when opening an asset file it will appear with its contextual files in VS Solution Explorer, which makes the next step easier.
Create a Shader and double click it to open it up in Visual Studio.
In Visual Studio, go to the Solution Explorer and right click the .shader file, then select Open With.... Scroll to find Visual Studio Code, and click Set as Default.
From now on, every time you edit a Shader file, Visual Studio will fire up, then Visual Studio code will open up immediately thereafter, with the shader file in it.
This will reuse an open instance of Visual Studio if it is already open, which is what I have most of the time, so the overhead of opening up Visual Studio to open Visual Studio code is nullified most of the time for me.
Is it possible to create different Visual Studio Code workspaces separately with extensions? For example, workspace_1 with a C++ extension and workspace_2 with a Python extension.
You can install extensions and then enable/disable them on specific workspaces.
Open a workspace
From the Extensions panel, click on the gear icon of each extension
If it's enabled, you can disable it on this workspace
If it's disabled, you can enable it for this workspace
Click on the three dots at the top-right to list either all enabled or disabled
There is unfortunately no way to configure this from settings.json file (user, workspace, or folder), as the extensions information does not seem to be stored there:
Enabled/Disabled extensions are not stored in workspace settings. Instead it is stored in local storage cache. You can manage them from the extensions view.
More information on Managing Extensions can be found in the Visual Studio Code documentation.
If you want to create a shareable list of extensions for specific workspaces (for example, perhaps to commit to source control or sharing with teammates), you can specify a list of recommended extensions per workspace.
Open the command palette
Enter Extensions: Configure Recommended Extensions (Workspace)
Enter a list of extensions IDs
For example, you want to recommend the "Visual Studio Code Ruby" extension
"extensions": {
"recommendations": [
"wingrunr21.vscode-ruby"
]
}
The format is {publisherName}.{extensionName}
You can get this from the extension's page in Visual Studio Code
When the user opens the workspace for the first time, they will be notified of recommended extensions to install.
Is there a way to build a target and debug that target all in one step in Visual Studio Code? This would be similar to the Build before running setup in Visual Studio. I'm running version 1.27.2 on Windows 7 and developing C code.
I already set a default item to build in my tasks.json file, and I have a default item configured in my debug settings. I'm wondering if I can configure VS Code to do both items with one command, or a setting where I can configure my project to build before running/debugging.
I have a question regarding Visual Studio Code deployment.
Visual Studio Code opens IE window to show Documentation for Visual Studio Code (https://code.visualstudio.com/docs?start=true) at first launch.
Is it possible to disable this?
I didn't find the proper setting. It seems that the Documentation window is not shown if the file %APPDATA%\Roaming\Code\Local Storage\file__0.localstorage exist. But I'm not sure if the same file can be used to suppress the IE window on different PCs and for different users.
you can go to File > Preferences > Settings, search "Startup Editor" in "Search Settings" and choose "None" from the drop-down menu.