GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Unlike `Start-Job`, `Start-ThreadJob` doesn't respect a `Set-PSBreakpoint -Command` call in connection with `Debug-Job` · Issue #39 · PowerShell/ThreadJob Open DescriptionPrerequisites
Steps to reproduce
Write-Verbose -Verbose 'Creating a job that uses `Set-PSBreakpoint -Command foo`' # NOTE: If you substitute `Start-Job` on the next line, the behavior is as expected. $job = Start-ThreadJob { function foo { 'hi' } Set-PSBreakpoint -Command foo foo } Write-Verbose -Verbose 'Waiting an arbitrary amount of time (e.g., 3 seconds)...' Start-Sleep 3 Write-Verbose -Verbose 'Initiating debugging...' $job | Debug-Job # Clean up. $job | Remove-Job -Force Expected behaviorHit Command breakpoint on 'foo' At line:3 char:16 + function foo { + That is, the break point should be honored, irrespective of when This is indeed how it works with a Actual behaviorDebug-Job: /path/to/some.ps1:42 Line | 19 | $job | Debug-Job | ~~~~~~~~~ | The provided job and all child jobs were examined but no jobs were found that could be debugged. In order to debug a job or child job the job must support debugging and | also be in a running state. That is, the thread job ran to completion without honoring the break point, and the attempt to call Error detailsNo response Environment dataPowerShell 7.5.0-preview.3 Version2.0.3, as shipped with PowerShell Core v7.5.0-preview.3 VisualsNo response ActivityMetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |