Add examples for Start-DebugAttachSession#5246
Merged
andyleejordan merged 1 commit intoPowerShell:mainfrom Aug 5, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds example scripts demonstrating the usage of the new Start-DebugAttachSession function from PowerShell Editor Services. The examples show how to attach a debugger to a child PowerShell process using custom named pipes.
- Provides a target script that can be debugged when launched as a child process
- Demonstrates the complete workflow for attaching to and debugging external PowerShell processes
- Includes handling for both Windows PowerShell 5.1 and PowerShell Core compatibility
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| examples/ChildDebugSessionTarget.ps1 | Target script that runs in a child process and waits for debugger attachment |
| examples/ChildDebugSessionAttach.ps1 | Main example script showing how to launch and attach to a child PowerShell process |
Adds examples to demonstrate how the new `Start-DebugAttachSession` function added in PowerShell Editor Services can be used.
056ff0d to
49c9289
Compare
Contributor
Author
|
PowerShell/PowerShellEditorServices#2249 has been merged so this is ready for review |
Start-DebugAttachSession
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Adds examples to demonstrate how the new
Start-DebugAttachSessionfunction added in PowerShell Editor Services can be used.The new function is attached by the PR PowerShell/PowerShellEditorServices#2249.
PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an
xbetween the square brackets.Please mark anything not applicable to this PR
NA.WIP:to the beginning of the title and remove the prefix when the PR is ready