mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add description of recommended settings for VS Code (#4054)
This commit is contained in:
@@ -61,6 +61,10 @@ To run the spellchecker, follow the steps as follows:
|
||||
|
||||
## Contributing to Code
|
||||
|
||||
### Code Editor
|
||||
|
||||
You should use the multi-platform [Visual Studio Code (VS Code)][use-vscode-editor].
|
||||
|
||||
### Building and testing
|
||||
|
||||
#### Building PowerShell
|
||||
@@ -302,4 +306,5 @@ Once you sign a CLA, all your existing and future pull requests will be labeled
|
||||
[open-issue]: https://github.com/PowerShell/PowerShell/issues
|
||||
[up-for-grabs]: https://github.com/powershell/powershell/issues?q=is%3Aopen+is%3Aissue+label%3AUp-for-Grabs
|
||||
[semantic linefeeds]: http://rhodesmill.org/brandon/2012/one-sentence-per-line/
|
||||
[PowerShell-Docs]: https://github.com/powershell/powershell-docs/
|
||||
[PowerShell-Docs]: https://github.com/powershell/powershell-docs/
|
||||
[use-vscode-editor]: ../docs/learning-powershell/using-vscode.md#editing-with-visual-studio-code
|
||||
|
||||
@@ -53,7 +53,7 @@ To exit Visual Studio Code, **File->Exit**.
|
||||
|
||||
If you wish to use a specific installation of PowerShell with Visual Studio Code, you will need to add a new variable to your user settings file.
|
||||
|
||||
1. Click **File -> Preferences -> User Settings**
|
||||
1. Click **File -> Preferences -> Settings**
|
||||
2. Two editor panes will appear.
|
||||
In the right-most pane (`settings.json`), insert the setting below appropriate for your OS somewhere between the two curly brackets (`{` and `}`) and replace *<version>* with the installed PowerShell version:
|
||||
|
||||
@@ -71,6 +71,22 @@ If you wish to use a specific installation of PowerShell with Visual Studio Code
|
||||
3. Replace the setting with the path to the desired PowerShell executable
|
||||
4. Save the settings file and restart Visual Studio Code
|
||||
|
||||
#### Configuration settings for Visual Studio Code
|
||||
|
||||
By using the steps in the previous paragraph you can add configuration settings in `settings.json`.
|
||||
|
||||
We recommend the following configuration settings for Visual Studio Code:
|
||||
|
||||
```json
|
||||
{
|
||||
"csharp.suppressDotnetRestoreNotification": true,
|
||||
"editor.renderWhitespace": "all",
|
||||
"editor.renderControlCharacters": true,
|
||||
"omnisharp.projectLoadTimeout": 120,
|
||||
"files.trimTrailingWhitespace": true
|
||||
}
|
||||
```
|
||||
|
||||
Debugging with Visual Studio Code
|
||||
----
|
||||
### No-workspace debugging
|
||||
|
||||
Reference in New Issue
Block a user