René's URL Explorer Experiment


Title: Unlike `Start-Job`, `Start-ThreadJob` doesn't respect a `Set-PSBreakpoint -Command` call in connection with `Debug-Job` · Issue #39 · PowerShell/ThreadJob · GitHub

Open Graph Title: Unlike `Start-Job`, `Start-ThreadJob` doesn't respect a `Set-PSBreakpoint -Command` call in connection with `Debug-Job` · Issue #39 · PowerShell/ThreadJob

X Title: Unlike `Start-Job`, `Start-ThreadJob` doesn't respect a `Set-PSBreakpoint -Command` call in connection with `Debug-Job` · Issue #39 · PowerShell/ThreadJob

Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest version Search the existing issues. Steps to reproduce When using Set-PSBreakpoint -Command from a background (child process-based) job, the Set-PS...

Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest version Search the existing issues. Steps to reproduce When using Set-PSBreakpoint -Command from a backgrou...

X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest version Search the existing issues. Steps to reproduce When using Set-PSBreakpoint -Command from a backgrou...

Opengraph URL: https://github.com/PowerShell/ThreadJob/issues/39

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unlike `Start-Job`, `Start-ThreadJob` doesn't respect a `Set-PSBreakpoint -Command` call in connection with `Debug-Job`","articleBody":"### Prerequisites\r\n\r\n- [X] Write a descriptive title.\r\n- [X] Make sure you are able to repro it on the latest version\r\n- [X] Search the existing issues.\r\n\r\n### Steps to reproduce\r\n\r\n* When using `Set-PSBreakpoint -Command` from a _background_ (_child process_-based) job, the `Set-PSBreakpoint -Command` is honored (assuming that the job is already in the `Running` state - see https://github.com/PowerShell/PowerShell/issues/21258): the breakpoint suspends execution until the `Debug-Job` call connects.\r\n\r\n* By contrast, with a _thread_ job, that doesn't work: the thread job runs to completion, irrespective of the break point; the same applies to `ForEach-Object -AsJob -Parallel`.\r\n\r\n```powershell\r\nWrite-Verbose -Verbose 'Creating a job that uses `Set-PSBreakpoint -Command foo`'\r\n# NOTE: If you substitute `Start-Job` on the next line, the behavior is as expected.\r\n$job = Start-ThreadJob {\r\n\r\n  function foo {\r\n    'hi'\r\n  }\r\n  \r\n  Set-PSBreakpoint -Command foo\r\n\r\n  foo\r\n\r\n} \r\n\r\nWrite-Verbose -Verbose 'Waiting an arbitrary amount of time (e.g., 3 seconds)...'\r\nStart-Sleep 3\r\n\r\nWrite-Verbose -Verbose 'Initiating debugging...'\r\n$job | Debug-Job\r\n\r\n# Clean up.\r\n$job | Remove-Job -Force\r\n```\r\n\r\n\r\n### Expected behavior\r\n\r\n```console\r\nHit Command breakpoint on 'foo'\r\n\r\nAt line:3 char:16\r\n+   function foo {\r\n+\r\n```\r\n\r\nThat is, the break point should be honored, irrespective of when `Debug-Job` is invoked, \r\nand the debugger should be entered.\r\n\r\nThis is indeed how it works with a `Start-Job` (_child process_-based) job.\r\n\r\n\r\n### Actual behavior\r\n\r\n```console\r\nDebug-Job: /path/to/some.ps1:42\r\nLine |\r\n  19 |  $job | Debug-Job\r\n     |         ~~~~~~~~~\r\n     | 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\r\n     | also be in a running state.\r\n```\r\n\r\nThat is, the thread job ran to completion without honoring the break point, and the attempt to call `Debug-Job` came too late.\r\n\r\n### Error details\r\n\r\n_No response_\r\n\r\n### Environment data\r\n\r\n```PowerShell\r\nPowerShell 7.5.0-preview.3\r\n```\r\n\r\n\r\n### Version\r\n\r\n2.0.3, as shipped with PowerShell Core v7.5.0-preview.3\r\n\r\n### Visuals\r\n\r\n_No response_","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2024-09-03T23:39:11Z","url":"https://github.com/PowerShell/ThreadJob/issues/39"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3c791958-34ac-e662-2ed3-a61e139bfe56
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA842:10BEBB:11CB822:192A326:6AFCD8C2
html-safe-nonce308f0eec58243c04e1f42c0796e41f64e8b2218cbf22426b7fe57b895558ffad
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODQyOjEwQkVCQjoxMUNCODIyOjE5MkEzMjY6NkFGQ0Q4QzIiLCJ2aXNpdG9yX2lkIjoiMTk4NTQ0MzMyMTIxOTk2MzA3NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac644d11281c7e703af33aebd421905636762121b6a0ad8d0d3090aa06a47b124f
hovercard-subject-tagissue:2503998349
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/ThreadJob/39/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2f97168cf74f79fbb7b0a9c3a586e83ac6a8fc0802e948c56c753bdeaf293eb7/PowerShell/ThreadJob/issues/39
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2f97168cf74f79fbb7b0a9c3a586e83ac6a8fc0802e948c56c753bdeaf293eb7/PowerShell/ThreadJob/issues/39
og:image:altPrerequisites Write a descriptive title. Make sure you are able to repro it on the latest version Search the existing issues. Steps to reproduce When using Set-PSBreakpoint -Command from a backgrou...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemklement0
hostnamegithub.com
expected-hostnamegithub.com
Noneb5b7bc7e41e0a604bbdb5035c7ed9620c2d28b9c8a18747182e2262a75abfd91
turbo-cache-controlno-preview
go-importgithub.com/PowerShell/ThreadJob git https://github.com/PowerShell/ThreadJob.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id265675369
octolytics-dimension-repository_nwoPowerShell/ThreadJob
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id265675369
octolytics-dimension-repository_network_root_nwoPowerShell/ThreadJob
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseff5022cc3aa767e6115451d9c322dd975506d40e
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/PowerShell/ThreadJob/issues/39#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FThreadJob%2Fissues%2F39
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FThreadJob%2Fissues%2F39
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=PowerShell%2FThreadJob
Reloadhttps://github.com/PowerShell/ThreadJob/issues/39
Reloadhttps://github.com/PowerShell/ThreadJob/issues/39
Reloadhttps://github.com/PowerShell/ThreadJob/issues/39
PowerShellhttps://github.com/PowerShell
ThreadJobhttps://github.com/PowerShell/ThreadJob
Codehttps://github.com/PowerShell/ThreadJob
Issues15 (15)https://github.com/PowerShell/ThreadJob/issues
Pull requests11 (11)https://github.com/PowerShell/ThreadJob/pulls
Actionshttps://github.com/PowerShell/ThreadJob/actions
Projectshttps://github.com/PowerShell/ThreadJob/projects
Security and qualityhttps://github.com/PowerShell/ThreadJob/security
Insightshttps://github.com/PowerShell/ThreadJob/insights
https://github.com/PowerShell/ThreadJob
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/ThreadJob/issues/39
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/ThreadJob/issues/39
Unlike Start-Job, Start-ThreadJob doesn't respect a Set-PSBreakpoint -Command call in connection with Debug-Jobhttps://github.com/PowerShell/ThreadJob/issues/39#top
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Sep 3, 2024https://github.com/PowerShell/ThreadJob/issues/39#issue-2503998349
Background jobs (Start-Job) and ForEach-Object -AsJob -Parallel, in combination with Debug-Job, prematurely report being in the Running state, before being ready for debugging PowerShell#21258https://github.com/PowerShell/PowerShell/issues/21258
Sign up for freehttps://github.com/signup?return_to=https://github.com/PowerShell/ThreadJob/issues/39
Sign in to commenthttps://github.com/login?return_to=https://github.com/PowerShell/ThreadJob/issues/39
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.