René's URL Explorer Experiment


Title: Capture Java process pid and display debug toolbar when running Java in terminal by testforstephen · Pull Request #413 · microsoft/java-debug · GitHub

Open Graph Title: Capture Java process pid and display debug toolbar when running Java in terminal by testforstephen · Pull Request #413 · microsoft/java-debug

X Title: Capture Java process pid and display debug toolbar when running Java in terminal by testforstephen · Pull Request #413 · microsoft/java-debug

Description: It does two things in this PR: Capture the Java process pid when running Java in a terminal shell. This is a follow-up of #399. Both the SpringBoot Dashboard and Spring Tools extension have the requirement to get the running Java pid from Java debugger, so it makes sense to support it in Java debugger directly for reuse. Since the DAP just returns the shell process pid when running Java in a terminal shell, the debugger have to find the running Java process based on the shell pid. In the standard shell environment such as PowerShell, cmd, Linux/macOS shells, the shell process is parent of Java process, it's easy to find Java subprocess from process tree. But this approach fails when using Git Bash as the default terminal, because the launched Java process is no longer a descendant process of the shell process. Git bash is based on MSYS2 platform, which is a fork of Cygwin technology. When running Cygwin exe in Windows, it runs at an emulator layer. So its process tree is not same as Windows process tree. Each Cygwin process has a mapped Windows pid. Running ps command in bash can list the cygwin's pid, cygwin's ppid and its winpid. Based on ps command, it's possible to find the running Java process and its parent Git bash process. Display the debug toolbar when using "Run Java" action to run Java in terminal without debugging. Keep the debug session alive until the Java process exits. This fixes microsoft/vscode-java-debug#1166

Open Graph Description: It does two things in this PR: Capture the Java process pid when running Java in a terminal shell. This is a follow-up of #399. Both the SpringBoot Dashboard and Spring Tools extension have the r...

X Description: It does two things in this PR: Capture the Java process pid when running Java in a terminal shell. This is a follow-up of #399. Both the SpringBoot Dashboard and Spring Tools extension have the r...

Opengraph URL: https://github.com/microsoft/java-debug/pull/413

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:d366a968-580d-8f68-1d85-5e83788faf83
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC8DA:10F5F7:F31F07:1474996:6A6124CA
html-safe-nonce8c238b6ce02b333357f417f84453d9adb4ca394d7a141d9290d51a3862b9317e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOERBOjEwRjVGNzpGMzFGMDc6MTQ3NDk5Njo2QTYxMjRDQSIsInZpc2l0b3JfaWQiOiI3NTU3MzcxOTg0MjEwODk2MDc0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac8f1a016d2198e80eb452edd0783c1e1661bf1c5edeb4d1c81ec1d184c3f92d6c
hovercard-subject-tagpull_request:943589161
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/microsoft/java-debug/pull/413/files
twitter:imagehttps://avatars.githubusercontent.com/u/14052197?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/14052197?s=400&v=4
og:image:altIt does two things in this PR: Capture the Java process pid when running Java in a terminal shell. This is a follow-up of #399. Both the SpringBoot Dashboard and Spring Tools extension have the r...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7d9987c85f924dc5597480f737e023a6e985b0316e672f00513eb4ba440d87ba
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/microsoft/java-debug git https://github.com/microsoft/java-debug.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id102583752
octolytics-dimension-repository_nwomicrosoft/java-debug
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id102583752
octolytics-dimension-repository_network_root_nwomicrosoft/java-debug
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released38dc1dac7b5a5d0788e068e080820de6de90a28
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/java-debug/pull/413/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fjava-debug%2Fpull%2F413%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fjava-debug%2Fpull%2F413%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=microsoft%2Fjava-debug
Reloadhttps://github.com/microsoft/java-debug/pull/413/files
Reloadhttps://github.com/microsoft/java-debug/pull/413/files
Reloadhttps://github.com/microsoft/java-debug/pull/413/files
Please reload this pagehttps://github.com/microsoft/java-debug/pull/413/files
microsoft https://github.com/microsoft
java-debughttps://github.com/microsoft/java-debug
Notifications https://github.com/login?return_to=%2Fmicrosoft%2Fjava-debug
Fork 201 https://github.com/login?return_to=%2Fmicrosoft%2Fjava-debug
Star 409 https://github.com/login?return_to=%2Fmicrosoft%2Fjava-debug
Code https://github.com/microsoft/java-debug
Issues 33 https://github.com/microsoft/java-debug/issues
Pull requests 10 https://github.com/microsoft/java-debug/pulls
Actions https://github.com/microsoft/java-debug/actions
Models https://github.com/microsoft/java-debug/models
Security and quality 0 https://github.com/microsoft/java-debug/security
Insights https://github.com/microsoft/java-debug/pulse
Code https://github.com/microsoft/java-debug
Issues https://github.com/microsoft/java-debug/issues
Pull requests https://github.com/microsoft/java-debug/pulls
Actions https://github.com/microsoft/java-debug/actions
Models https://github.com/microsoft/java-debug/models
Security and quality https://github.com/microsoft/java-debug/security
Insights https://github.com/microsoft/java-debug/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fmicrosoft%2Fjava-debug%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fmicrosoft%2Fjava-debug%2Fissues%2Fnew%2Fchoose
testforstephenhttps://github.com/testforstephen
microsoft:mainhttps://github.com/microsoft/java-debug/tree/main
testforstephen:jinbo_runhttps://github.com/testforstephen/java-debug/tree/jinbo_run
Conversation 2 https://github.com/microsoft/java-debug/pull/413
Commits 4 https://github.com/microsoft/java-debug/pull/413/commits
Checks 0 https://github.com/microsoft/java-debug/pull/413/checks
Files changed https://github.com/microsoft/java-debug/pull/413/files
Please reload this pagehttps://github.com/microsoft/java-debug/pull/413/files
Capture Java process pid and display debug toolbar when running Java in terminal https://github.com/microsoft/java-debug/pull/413/files#top
Show all changes 4 commits https://github.com/microsoft/java-debug/pull/413/files
83a1021 Capture Java process pid and display debug toolbar when running Java … testforstephen May 22, 2022 https://github.com/microsoft/java-debug/pull/413/commits/83a10219ed52ad476e80ea4584223d5a26044d9b
5a6fe21 Use 'ps -l' command testforstephen May 23, 2022 https://github.com/microsoft/java-debug/pull/413/commits/5a6fe2199ad7f380e3d668cc5f86d6e4627dad0c
a9443f2 Make checkstyle happy testforstephen May 23, 2022 https://github.com/microsoft/java-debug/pull/413/commits/a9443f29b79523a063f63f556222fd33de9d0443
dbe7357 Improve the check logic of Cygwin shell to cover more cases testforstephen May 24, 2022 https://github.com/microsoft/java-debug/pull/413/commits/dbe73577393a12e424682b43b46f3512ee73e958
Clear filters https://github.com/microsoft/java-debug/pull/413/files
Please reload this pagehttps://github.com/microsoft/java-debug/pull/413/files
Please reload this pagehttps://github.com/microsoft/java-debug/pull/413/files
DisconnectRequestWithoutDebuggingHandler.java https://github.com/microsoft/java-debug/pull/413/files#diff-c1d53b667a7c1cfb74985b1a5bee84a54915d257549a5eceb72d412389279461
LaunchUtils.java https://github.com/microsoft/java-debug/pull/413/files#diff-7f64534b85e73bc02b175c132e393ab2880e22ae225e2a13127d6031eadc8dba
LaunchWithDebuggingDelegate.java https://github.com/microsoft/java-debug/pull/413/files#diff-470fdbc0f6c1b2e1155afe19cbb3c4c6df95c612532efb39ff192e372e6753e5
LaunchWithoutDebuggingDelegate.java https://github.com/microsoft/java-debug/pull/413/files#diff-2a94dc98c83b0730038929f9a28fc2978815a78b71bb4ef4693388507a072adc
https://github.com/microsoft/java-debug/blob/main/.github/CODEOWNERS#L1
...m/microsoft/java/debug/core/adapter/handler/DisconnectRequestWithoutDebuggingHandler.javahttps://github.com/microsoft/java-debug/pull/413/files#diff-c1d53b667a7c1cfb74985b1a5bee84a54915d257549a5eceb72d412389279461
View file https://github.com/testforstephen/java-debug/blob/dbe73577393a12e424682b43b46f3512ee73e958/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/DisconnectRequestWithoutDebuggingHandler.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/java-debug/pull/413/{{ revealButtonHref }}
https://github.com/microsoft/java-debug/pull/413/files#diff-c1d53b667a7c1cfb74985b1a5bee84a54915d257549a5eceb72d412389279461
https://github.com/microsoft/java-debug/pull/413/files#diff-c1d53b667a7c1cfb74985b1a5bee84a54915d257549a5eceb72d412389279461
https://github.com/microsoft/java-debug/blob/main/.github/CODEOWNERS#L1
...a.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/LaunchUtils.javahttps://github.com/microsoft/java-debug/pull/413/files#diff-7f64534b85e73bc02b175c132e393ab2880e22ae225e2a13127d6031eadc8dba
View file https://github.com/testforstephen/java-debug/blob/dbe73577393a12e424682b43b46f3512ee73e958/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/LaunchUtils.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/java-debug/pull/413/{{ revealButtonHref }}
https://github.com/microsoft/java-debug/pull/413/files#diff-7f64534b85e73bc02b175c132e393ab2880e22ae225e2a13127d6031eadc8dba
https://github.com/microsoft/java-debug/pull/413/files#diff-7f64534b85e73bc02b175c132e393ab2880e22ae225e2a13127d6031eadc8dba
https://github.com/microsoft/java-debug/pull/413/files#diff-7f64534b85e73bc02b175c132e393ab2880e22ae225e2a13127d6031eadc8dba
https://github.com/microsoft/java-debug/pull/413/files#diff-7f64534b85e73bc02b175c132e393ab2880e22ae225e2a13127d6031eadc8dba
https://github.com/microsoft/java-debug/pull/413/files#diff-7f64534b85e73bc02b175c132e393ab2880e22ae225e2a13127d6031eadc8dba
https://github.com/microsoft/java-debug/blob/main/.github/CODEOWNERS#L1
.../main/java/com/microsoft/java/debug/core/adapter/handler/LaunchWithDebuggingDelegate.javahttps://github.com/microsoft/java-debug/pull/413/files#diff-470fdbc0f6c1b2e1155afe19cbb3c4c6df95c612532efb39ff192e372e6753e5
View file https://github.com/testforstephen/java-debug/blob/dbe73577393a12e424682b43b46f3512ee73e958/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/LaunchWithDebuggingDelegate.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/java-debug/pull/413/{{ revealButtonHref }}
https://github.com/microsoft/java-debug/pull/413/files#diff-470fdbc0f6c1b2e1155afe19cbb3c4c6df95c612532efb39ff192e372e6753e5
https://github.com/microsoft/java-debug/pull/413/files#diff-470fdbc0f6c1b2e1155afe19cbb3c4c6df95c612532efb39ff192e372e6753e5
https://github.com/microsoft/java-debug/pull/413/files#diff-470fdbc0f6c1b2e1155afe19cbb3c4c6df95c612532efb39ff192e372e6753e5
https://github.com/microsoft/java-debug/blob/main/.github/CODEOWNERS#L1
...in/java/com/microsoft/java/debug/core/adapter/handler/LaunchWithoutDebuggingDelegate.javahttps://github.com/microsoft/java-debug/pull/413/files#diff-2a94dc98c83b0730038929f9a28fc2978815a78b71bb4ef4693388507a072adc
View file https://github.com/testforstephen/java-debug/blob/dbe73577393a12e424682b43b46f3512ee73e958/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/LaunchWithoutDebuggingDelegate.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/java-debug/pull/413/{{ revealButtonHref }}
https://github.com/microsoft/java-debug/pull/413/files#diff-2a94dc98c83b0730038929f9a28fc2978815a78b71bb4ef4693388507a072adc
https://github.com/microsoft/java-debug/pull/413/files#diff-2a94dc98c83b0730038929f9a28fc2978815a78b71bb4ef4693388507a072adc
https://github.com/microsoft/java-debug/pull/413/files#diff-2a94dc98c83b0730038929f9a28fc2978815a78b71bb4ef4693388507a072adc
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.