Don't stop debugging after script execution in TemporaryIntegratedConsole
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Beginnen Sie mit ConfigurationDoneHandler.cs und prüfen Sie den referenzierten Workaround-Commit. Vergleichen Sie anschließend das zugehörige vscode-powershell-Issue. Überprüfen Sie, wie ein konfiguriertes Skript die Debugging-Sitzung beendet, während die temporäre Konsole geöffnet bleibt. Als erledigt gilt die Aufgabe, wenn die Sitzung nach der Skriptausführung für interaktives Debugging mit Breakpoints aktiv bleiben kann und endet, sobald die temporäre Konsole geschlossen wird, vorzugsweise hinter einer Option.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- C#
- Sterne
- 767
- Forks
- 266
- Ø Merge
- 3 T. 16 Std.
- Gemergte PRs (30 T.)
- 1
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus PowerShell/PowerShellEditorServices
-
[Bug] None of the string overloads of `EditorExtensionServiceProvider.GetService()` work on .NET. Offen
PowerShell/PowerShellEditorServices#2331 · 1 Reaktion · 2 zugewiesene Personen ·
-
Area-Language Server Issue-Enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
PowerShell/PowerShellEditorServices#2315 · 1 Kommentar ·
-
Area-Debugging Issue-Enhancement
PowerShell/PowerShellEditorServices#2294 · 1 Reaktion · 2 zugewiesene Personen ·
-
Issue-Bug Needs: Triage
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
PowerShell/PowerShellEditorServices#2293 · 1 Kommentar ·
-
PowerShell/PowerShellEditorServices#2282 · 1 Kommentar · 1 Reaktion · 2 zugewiesene Personen ·
Alle Issues in PowerShell/PowerShellEditorServices
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
nightscout/nocturne#1425 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
RayWangQvQ/BiliBiliToolPro#1137 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100