Skip to content

Conversation

@jborean93
Copy link
Contributor

@jborean93jborean93 commented Jul 25, 2025

PR Summary

Adds examples to demonstrate how the new Start-DebugAttachSession function 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 x between the square brackets.
Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
  • Summarized changes
  • [NA] PR has tests
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

CopilotAI review requested due to automatic review settings July 25, 2025 05:21
@jborean93jborean93 requested a review from a team as a code ownerJuly 25, 2025 05:21
Copy link

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

FileDescription
examples/ChildDebugSessionTarget.ps1Target script that runs in a child process and waits for debugger attachment
examples/ChildDebugSessionAttach.ps1Main 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.
@jborean93jborean93 changed the title WIP: Add examples for Start-DebugAttachSessionAdd examples for Start-DebugAttachSessionAug 5, 2025
@jborean93
Copy link
ContributorAuthor

PowerShell/PowerShellEditorServices#2249 has been merged so this is ready for review

Copy link
Member

@andyleejordanandyleejordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@andyleejordanandyleejordan merged commit afd1b69 into PowerShell:mainAug 5, 2025
4 checks passed
@jborean93jborean93 deleted the start-debugging branch August 5, 2025 19:22
@andyleejordanandyleejordan added Issue-Enhancement A feature request (enhancement). Area-Debugging labels Sep 10, 2025
@andyleejordanandyleejordan changed the title Add examples for Start-DebugAttachSessionAdd examples for Start-DebugAttachSessionSep 10, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-DebuggingIssue-EnhancementA feature request (enhancement).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jborean93@andyleejordan