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
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d366a968-580d-8f68-1d85-5e83788faf83 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C8DA:10F5F7:F31F07:1474996:6A6124CA |
| html-safe-nonce | 8c238b6ce02b333357f417f84453d9adb4ca394d7a141d9290d51a3862b9317e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOERBOjEwRjVGNzpGMzFGMDc6MTQ3NDk5Njo2QTYxMjRDQSIsInZpc2l0b3JfaWQiOiI3NTU3MzcxOTg0MjEwODk2MDc0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8f1a016d2198e80eb452edd0783c1e1661bf1c5edeb4d1c81ec1d184c3f92d6c |
| hovercard-subject-tag | pull_request:943589161 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/microsoft/java-debug/pull/413/files |
| twitter:image | https://avatars.githubusercontent.com/u/14052197?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/14052197?s=400&v=4 |
| og:image:alt | 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... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d9987c85f924dc5597480f737e023a6e985b0316e672f00513eb4ba440d87ba |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/microsoft/java-debug git https://github.com/microsoft/java-debug.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 102583752 |
| octolytics-dimension-repository_nwo | microsoft/java-debug |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 102583752 |
| octolytics-dimension-repository_network_root_nwo | microsoft/java-debug |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d38dc1dac7b5a5d0788e068e080820de6de90a28 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width