Title: Bring launch sequencing in line with DAP spec · Issue #2191 · PowerShell/PowerShellEditorServices · GitHub
Open Graph Title: Bring launch sequencing in line with DAP spec · Issue #2191 · PowerShell/PowerShellEditorServices
X Title: Bring launch sequencing in line with DAP spec · Issue #2191 · 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 Currently, our DAP conversation doesn't follow the spec explicitly in terms of conversation. What is ...
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 Currently, our DAP conversation doesn't follow the spec expli...
X Description: Prerequisites I have written a descriptive issue title. I have searched all issues to ensure it has not already been requested. Summary Currently, our DAP conversation doesn't follow the spec e...
Opengraph URL: https://github.com/PowerShell/PowerShellEditorServices/issues/2191
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bring launch sequencing in line with DAP spec","articleBody":"### Prerequisites\r\n\r\n- [X] I have written a descriptive issue title.\r\n- [X] I have searched all [issues](https://github.com/PowerShell/PowerShellEditorServices/issues?q=is%3Aissue) to ensure it has not already been requested.\r\n\r\n### Summary\r\n\r\nCurrently, our DAP conversation doesn't follow the spec explicitly in terms of conversation.\r\n\r\nWhat is supposed to happen:\r\n1. Initialize is sent and server responds, then responds with capabilities\r\n1. Launch is sent by client after receiving capabilities. **should be held and deferred until configurationDone**\r\n1. Server sends initialized event (preferably when ready to receive launch requests)\r\n3. Client does config after initialized \r\n4. Configuration is done (breakpoints etc.)\r\n5. launch request is now responded to after configuration is completed\r\n\r\nIn actuality, we respond to the launch request immediately before configuration\r\n\r\n\r\nThe spec states:\r\n```\r\nOnce the debug adapter is ready to receive configuration from the client, it sends an initialized event to the client. As described above, the client sends zero or more configuration-related requests before sending a configurationDone request.\r\n\r\nAfter the response to configurationDone is sent, the debug adapter may respond to the launch or attach request, and then the debug session has started.\r\n```\r\n\r\n### Proposed Design\r\n\r\nWe need to hold the launch response until after configurationDone is completed. Fixing this would likely be part of a larger refactor to fix the odd behavior of scripts being started directly within configurationDone handler, rather than configurationDone triggering an event or otherwise to start/release any pending launch messages.\r\n\r\nAs part of this, because the spec currently does not allow multiplexing requests over a single adapter channel, the launch/attach should singleton and throw an error if any additional launch/attach requests are made until the existing one completes.\r\n\r\n### Implementation Idea\r\nWhen a launch task is started, a `TaskCompletionSource` or otherwise should be started and awaited, and the configurationDone handler will complete that task, enabling the launch task to resume and return its startup response.","author":{"url":"https://github.com/JustinGrote","@type":"Person","name":"JustinGrote"},"datePublished":"2024-10-15T00:19:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/2191/PowerShellEditorServices/issues/2191"}
| 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:5d07c1a0-5d55-7b25-f5d7-8d38c00bb6cc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 90B8:3E07E8:124A3D0:1A629AE:6A57787F |
| html-safe-nonce | e69c7d8181f9bffa9501976124d55ba8c12d1bfa1ff55b79ba8092bd22abbb92 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MEI4OjNFMDdFODoxMjRBM0QwOjFBNjI5QUU6NkE1Nzc4N0YiLCJ2aXNpdG9yX2lkIjoiNjU1MzcyNDMwMTM1ODg4OTA4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7e3a3f22525c691534bc1198a782691079c8cea650c1b18afb92b2056f7225bf |
| hovercard-subject-tag | issue:2587332440 |
| 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/2191/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2ec5ca6f7db6d9445439950dc49d9217a800f7ac71a176af6376a61998c722b1/PowerShell/PowerShellEditorServices/issues/2191 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2ec5ca6f7db6d9445439950dc49d9217a800f7ac71a176af6376a61998c722b1/PowerShell/PowerShellEditorServices/issues/2191 |
| 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 Currently, our DAP conversation doesn't follow the spec expli... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JustinGrote |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98 |
| 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 | c0ca805e53f128ba1f966be1d3ccd81d0d1959c7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width