Don't stop debugging after script execution in TemporaryIntegratedConsole
還沒有人認領這個 Issue。
評估
研究方向
從 ConfigurationDoneHandler.cs 開始,檢查所參照的 workaround commit,然後比較相關的 vscode-powershell issue。確認已設定的指令碼如何在保持暫時主控台開啟的同時結束偵錯工作階段。完成的標準是:指令碼執行後,工作階段仍可保持作用中以進行互動式中斷點偵錯,並在暫時主控台關閉時結束,最好透過一個選項控制。
由索引模型根據 Issue 內容生成。
描述
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been requested.
Summary
I use VSCode for developing PowerShell modules. For debugging, I create a PowerShell configuration in the launch.json file with createTemporaryIntegratedConsole option enabled. This allows for a dedicated PowerShell session for debugging that is easy to restart.
In launch.json configuration, if the script option is not provided, the debugger still waits after the [TEMP] PowerShell Extension console opens: the debugger works in interactive mode, and if a command executed in the console hits a breakpoint, the debugger pauses. This mode allows you to efficiently debug a module, rather than having to update a temporary script.
If commands are entered in the script property in launch.json, for example to load the module and set the environment, the script is executed by PES and then the debugging session is stopped, although the temporary console remains open. This makes it impossible to debug in interactive mode. This requires not filling in the script property and manually entering the initialization commands each time the debugging session is (re)started, which is not practical for daily use when you frequently need to start from scratch.
Proposed Design
It would be useful if the debug session did not close until the temporary console is closed (since the primary purpose of running a script this way is to debug). While this cannot be enabled by default for reasons I do not know, an option to enforce this behavior would be welcome and very useful for developers.
I haven't found a similar request here, but I did find one in the vscode-powershell repository: https://github.com/PowerShell/vscode-powershell/issues/1168
For my part, I have implemented a workaround that meets this need, while waiting for an official solution, by modifying a line in the ConfigurationDoneHandler.cs file: https://github.com/jul-m/PowerShellEditorServices/commit/d864c898600b82dd9b33f5abf7d7327c8af7224b
- 主要語言
- C#
- 星號
- 772
- 分支
- 268
- 平均合併
- 3 天 16 小時
- 30 天內合併 PR
- 1
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PowerShell/PowerShellEditorServices 的其他 Issue
-
[Bug] None of the string overloads of `EditorExtensionServiceProvider.GetService()` work on .NET.可能重新可做 @andyleejordan 於 101 天前認領,目前沒有進行中的 PR。 未關閉
PowerShell/PowerShellEditorServices#2331 · 1 個 reaction · 已指派 2 人 ·
-
Area-Language Server Issue-Enhancement
難度 4/5 3-5 天 新手友好度 48/100
PowerShell/PowerShellEditorServices#2315 · 1 則留言 ·
-
Improve Constrained Runspace Debug Experience可能已有人在做 @JustinGrote 於 124 天前認領。 未關閉Area-Debugging Issue-Enhancement
PowerShell/PowerShellEditorServices#2294 · 1 個 reaction · 已指派 2 人 ·
-
Issue-Bug Needs: Triage
難度 4/5 3-5 天 新手友好度 48/100
PowerShell/PowerShellEditorServices#2293 · 1 則留言 ·
-
Document outline drops child variables when a function/filter reuses a variable name declared earlier (scope-blind declaration dedup)可能已有人在做 @JustinGrote 於 152 天前認領。 未關閉
PowerShell/PowerShellEditorServices#2282 · 1 則留言 · 1 個 reaction · 已指派 2 人 ·
查看 PowerShell/PowerShellEditorServices 的全部 Issue
相似的 Issue
-
[Doc Gap] Document new --enable-public-network-access breaking change for azurebackup vault create未關閉copilot documentation
難度 2/5 1-3 小時 新手友好度 86/100
維護者通常 1 天內回覆
-
area-dashboard
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
0 - Backlog Bug
難度 2/5 1-3 小時 新手友好度 72/100
BrighterCommand/Brighter#4539 ·
維護者通常 1 天內回覆
-
triage
難度 2/5 1-3 小時 新手友好度 78/100
-
area-networking
難度 2/5 1-3 小時 新手友好度 68/100
dotnet/aspnetcore#69671 · 1 則留言 ·
維護者通常 1 天內回覆