Title: Don't stop debugging after script execution in TemporaryIntegratedConsole · Issue #2180 · PowerShell/PowerShellEditorServices · GitHub
Open Graph Title: Don't stop debugging after script execution in TemporaryIntegratedConsole · Issue #2180 · PowerShell/PowerShellEditorServices
X Title: Don't stop debugging after script execution in TemporaryIntegratedConsole · Issue #2180 · PowerShell/PowerShellEditorServices
Description: 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...
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/PowerShell/PowerShellEditorServices/issues/2180
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Don't stop debugging after script execution in TemporaryIntegratedConsole","articleBody":"### Prerequisites\n\n- [X] I have written a descriptive issue title.\n- [X] I have searched all [issues](https://github.com/PowerShell/PowerShellEditorServices/issues?q=is%3Aissue) to ensure it has not already been requested.\n\n### Summary\n\nI 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.\r\n\r\nIn `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.\r\n\r\nIf 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.\n\n### Proposed Design\n\nIt 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.\r\n\r\nI 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\r\n\r\nFor 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","author":{"url":"https://github.com/jul-m","@type":"Person","name":"jul-m"},"datePublished":"2024-09-21T01:57:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/2180/PowerShellEditorServices/issues/2180"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:25585a11-652b-a577-8da2-8eb219ac414d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D4A0:133F2F:256DD2:340F50:6A5842D4 |
| html-safe-nonce | 0c470f1bbf206104583897bab4e82e65c67e68a654e8287b363e2cdddd0343e6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEEwOjEzM0YyRjoyNTZERDI6MzQwRjUwOjZBNTg0MkQ0IiwidmlzaXRvcl9pZCI6IjI3MzE4NzQ4MTQzODY1MjA3ODgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 712b1f62e992661b99038a39c5efd61271a320f32710c832583bdc4b638929a1 |
| hovercard-subject-tag | issue:2539903450 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShellEditorServices/2180/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2ac38e433bf77d91f57b8df5abb9c1d23c5d42176db7e2322f6f09eb2806aca0/PowerShell/PowerShellEditorServices/issues/2180 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2ac38e433bf77d91f57b8df5abb9c1d23c5d42176db7e2322f6f09eb2806aca0/PowerShell/PowerShellEditorServices/issues/2180 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jul-m |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShellEditorServices git https://github.com/PowerShell/PowerShellEditorServices.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 36031537 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShellEditorServices |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36031537 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShellEditorServices |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width