Skip to content

Commit 7aae792

Browse files
committed
Optimize Launch Configs and Enable Hot Reload
1 parent 3c71fcf commit 7aae792

9 files changed

+599
-396
lines changed

.vscode/launch.json

-127
This file was deleted.

.vscode/tasks.json

-30
This file was deleted.

docs/development.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,19 @@ Invoke-Build Build
5656
Explore the `vscode-powershell.build.ps1` file for other build targets.
5757

5858
### Launching the extension
59+
First, ensure you have completed a build as instructed above, as the launch templates do not check some prerequisites for performance reasons.
5960

60-
To debug the extension use one of the provided `Launch Extension` debug configurations (remember to rebuild first).
61-
You can simultaneously use the `Attach to Editor Services` configuration to attach the .NET debugger to the PowerShell process running the server.
62-
Try the `powershell.developer.editorServicesWaitForDebugger` setting to attach before startup.
61+
To debug the extension use one of the provided `Launch Extension` debug configurations.
62+
1. `Launch Extension`: Launches the debugger using your personal profile settings.
63+
2. `Temp Profile`: Launches VS Code with a temp profile that resets on every launch. Useful for "out of the box" environment testing.
64+
3. `Isolated Profile`: Launches the debugger with a persistent debug profile specific to the extension, so you can preserve some settings or test certain prerequisites.
65+
66+
All three templates use pre-launch tasks to build the code, and support automatic restart of the extension host on changes to the Extension source code. [Hot Reload](https://devblogs.microsoft.com/dotnet/introducing-net-hot-reload/) is also enabled for PowerShell Editor Services.
67+
68+
> [!WARNING]
69+
> There is a current limitation that, if you restart the extension/extension host or it is restarted due to a extension code change, the editor services attachment will be disconnected due to the PSES terminal being terminated, and you will either need to restart the debug session completely, or do a manual build of PSES and run the `Attach to Editor Services` debug launch manually.
70+
71+
Try the `powershell.developer.editorServicesWaitForDebugger` setting to ensure that you are fully attached before the extension startup process continues.
6372

6473
## Contributing Snippets
6574

0 commit comments

Comments
 (0)