-
Notifications
You must be signed in to change notification settings - Fork 511
Debugger hangs in finally block after CTRL+C #5155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@kborowinski thanks! I can reproduce this on 7.5, and Also FYI your logs were ran at |
@JustinGrote I did have the debug set to StartEditorServices-21352.log Is it another bug? And trace is sent to the terminal window instead: There is full trace: DEBUG: [Trace] Logging started
DEBUG: [Trace] Beginning EndProcessing block
DEBUG: Removing PSReadLine
DEBUG: [Trace] Creating host configuration
DEBUG: [Trace] Determining REPL kind
DEBUG: [Trace] REPL configured as PSReadLine
DEBUG: [Trace] Configuring LSP transport
DEBUG: [Trace] Configuring debug transport
DEBUG: [Trace] Session file writer created
DEBUG: Adding AssemblyResolve event handler for new AssemblyLoadContext dependency loading
DEBUG: Loading EditorServices
DEBUG: [Trace] PID: 21352
DEBUG:
== Build Details ==
- Editor Services version: 4.2.0
- Build origin: Release
- Build commit: f1c2044ab2c38dd1fda8335a8723c72105703791
- Build time: 2025-01-16 00:00:00
DEBUG:
== Host Startup Configuration Details ==
- Host name: Visual Studio Code Host
- Host version: 2025.1.0
- Host profile ID: Microsoft.VSCode
- PowerShell host type: System.Management.Automation.Internal.Host.InternalHost
- REPL setting: PSReadLine
- Session details path: c:\Users\Bukem\AppData\Roaming\Code\User\globalStorage\ms-vscode.powershell\sessions\PSES-VSCode-17800-900811.json
- Bundled modules path: c:\Users\Bukem\.vscode\extensions\ms-vscode.powershell-2025.1.0\modules
- Additional modules: <null>
- Feature flags: PSReadLine
- Log path: c:\Users\Bukem\AppData\Roaming\Code\logs\20250312T074113\window1\exthost\ms-vscode.powershell
- Minimum log level: Trace
- Profile paths:
+ AllUsersAllHosts: C:\Program Files\PowerShell\Nightly\profile.ps1
+ AllUsersCurrentHost: C:\Program Files\PowerShell\Nightly\Microsoft.VSCode_profile.ps1
+ CurrentUserAllHosts: D:\Users\Bukem\Documents\PowerShell\profile.ps1
+ CurrentUserCurrentHost: D:\Users\Bukem\Documents\PowerShell\Microsoft.VSCode_profile.ps1
DEBUG: [Trace] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: Microsoft.PowerShell.Commands.Diagnostics, Version=7.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
DEBUG: [Trace] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: System.Diagnostics.PerformanceCounter, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
DEBUG: [Trace] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: Microsoft.PowerShell.Commands.Utility, Version=7.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
DEBUG: [Trace] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: Microsoft.PowerShell.MarkdownRender, Version=7.2.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
DEBUG: [Trace] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: System.Text.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
DEBUG: [Trace] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: System.Net.Http, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
DEBUG: [Trace] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: Microsoft.PowerShell.Commands.Management, Version=7.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
DEBUG: [Trace] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: Microsoft.PowerShell.Security, Version=7.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
DEBUG: [Trace] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: Microsoft.WSMan.Management, Version=7.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
DEBUG: [Trace] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: Microsoft.WSMan.Runtime, Version=7.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
DEBUG:
== Console Details ==
- Console input encoding: OEM United States
- Console output encoding: OEM United States
- PowerShell output encoding: Unicode (UTF-8)
DEBUG:
== Environment Details ==
- OS description: Microsoft Windows 10.0.26100
- OS architecture: X64
- Process bitness: 64
DEBUG: [Trace]
== PowerShell Details ==
- PowerShell version: 7.6.0
- Language mode: FullLanguage
DEBUG: [Trace] Updated PSModulePath to: 'D:\Users\Bukem\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\powershell\nightly\Modules;C:\ProgramData\scoop\modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;c:\Users\Bukem\.vscode\extensions\ms-vscode.powershell-2025.1.0\modules'
DEBUG: Validating configuration
VERBOSE: Loading PowerShell Editor Services Assemblies
DEBUG: [Trace] Assembly resolve event fired for Microsoft.PowerShell.EditorServices, Version=4.2.0.0, Culture=neutral, PublicKeyToken=null
DEBUG: Loading PSES DLL using new assembly load context
DEBUG: [Trace] Loaded into load context "PsesLoadContext" Microsoft.PowerShell.EditorServices.Hosting.PsesLoadContext #1: Microsoft.PowerShell.EditorServices, Version=4.2.0.0, Culture=neutral, PublicKeyToken=null
DEBUG: [Trace] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: System.Reflection.Metadata, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
DEBUG: [Trace] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: System.IO.MemoryMappedFiles, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
DEBUG: [Trace] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: System.Collections.Immutable, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Services.Hosting.PsesLoadContext #1: Microsoft.Extensions.Logging.Abstractions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
DEBUG: Creating/running editor services
DEBUG: Creating startup info object
VERBOSE: PSES Startup Completed. Starting Language Server.
VERBOSE: Please check the LSP log file in your client for further messages. In VSCode, this is the 'PowerShell' output pane Last line in the trace mentions to check the 2025-03-12 07:41:14.936 [info] Visual Studio Code: v1.98.1 64-bit on Windows 64-bit
2025-03-12 07:41:14.936 [info] PowerShell Extension: v2025.1.0
2025-03-12 07:41:14.995 [info] Starting 'PowerShell Core Nightly (x64)' at: C:\Program Files\PowerShell\Nightly\pwsh.exe
2025-03-12 07:41:15.189 [info] PowerShell process started with PID: 21352
2025-03-12 07:41:18.315 [info] [PSES] Microsoft.PowerShell.EditorServices.Logging.HostLoggerAdapter: Loading PowerShell Editor Services Assemblies |
2025-03-12 07:41:18.327 [info] [PSES] Microsoft.PowerShell.EditorServices.Logging.HostLoggerAdapter: Starting PowerShell Editor Services |
2025-03-12 07:41:18.377 [info] [PSES] Microsoft.PowerShell.EditorServices.Logging.HostLoggerAdapter: PSES Startup Completed. Starting Language Server. |
2025-03-12 07:41:18.387 [info] [PSES] Microsoft.PowerShell.EditorServices.Logging.HostLoggerAdapter: Please check the LSP log file in your client for further messages. In VSCode, this is the 'PowerShell' output pane |
2025-03-12 07:41:18.443 [info] [PSES] Microsoft.PowerShell.EditorServices.Services.PowerShell.Console.ReadLineProvider: ReadLine overridden with 'Microsoft.PowerShell.EditorServices.Services.PowerShell.Console.PsrlReadLine' |
2025-03-12 07:41:18.623 [info] Started PowerShell v7.6.0-preview.3.
2025-03-12 07:41:19.438 [info] [PSES] Microsoft.PowerShell.EditorServices.Services.AnalysisService: Found PSSA settings file at 'd:\Users\Bukem\Documents\PowerShell\PSScriptAnalyzerSettings.psd1' |
2025-03-12 07:41:19.439 [info] [PSES] Microsoft.PowerShell.EditorServices.Services.AnalysisService: Configuring PSScriptAnalyzer with rules at 'd:\Users\Bukem\Documents\PowerShell\PSScriptAnalyzerSettings.psd1' | |
Prerequisites
Summary
Debugger and terminal hangs while debugging script in
finally {}
block afterCTRL+C
was pressed.PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
$counter
in thefinally {}
blockCTRL+C
Visuals
Logs
PowerShell Trace LSP.log
PowerShell.log
StartEditorServices-27172.log
The text was updated successfully, but these errors were encountered: