René's URL Explorer Experiment


Title: Stop with integratedTerminal/externalTerminal still uses vm.exit(0), shutdown hooks do not run · Issue #1732 · microsoft/vscode-java-debug · GitHub

Open Graph Title: Stop with integratedTerminal/externalTerminal still uses vm.exit(0), shutdown hooks do not run · Issue #1732 · microsoft/vscode-java-debug

X Title: Stop with integratedTerminal/externalTerminal still uses vm.exit(0), shutdown hooks do not run · Issue #1732 · microsoft/vscode-java-debug

Description: Follow-up to #1720 (fixed by microsoft/java-debug#645). Since 0.60.2026102705, the first Stop sends terminate, keeps JDI attached, and the JVM shuts down gracefully, so breakpoints in shutdown hooks are hit. This works with "console": "i...

Open Graph Description: Follow-up to #1720 (fixed by microsoft/java-debug#645). Since 0.60.2026102705, the first Stop sends terminate, keeps JDI attached, and the JVM shuts down gracefully, so breakpoints in shutdown hook...

X Description: Follow-up to #1720 (fixed by microsoft/java-debug#645). Since 0.60.2026102705, the first Stop sends terminate, keeps JDI attached, and the JVM shuts down gracefully, so breakpoints in shutdown hook...

Opengraph URL: https://github.com/microsoft/vscode-java-debug/issues/1732

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Stop with integratedTerminal/externalTerminal still uses vm.exit(0), shutdown hooks do not run","articleBody":"Follow-up to #1720 (fixed by microsoft/java-debug#645).\n\nSince 0.60.2026102705, the first **Stop** sends `terminate`, keeps JDI attached, and the JVM shuts down gracefully, so breakpoints in shutdown hooks are hit. This works with `\"console\": \"internalConsole\"`. With `\"console\": \"integratedTerminal\"` or `\"externalTerminal\"` the problem from #1720 is still there: shutdown hooks do not run at all.\n\n##### Environment\n- Operating System: Linux Mint 22.1\n- JDK version: 21.0.7\n- Java Debugger extension version: 0.60.2026102705 or later\n\n##### Steps To Reproduce\n1. Use the program from #1720:\n   ```java\n   public class App {\n       public static void main(String[] args) throws Exception {\n           Runtime.getRuntime().addShutdownHook(new Thread(() -> {\n               System.out.println(\"hook start\");   // breakpoint here\n               System.out.println(\"hook end\");\n           }));\n           Thread.sleep(Long.MAX_VALUE);\n       }\n   }\n   ```\n2. Launch it with `\"console\": \"integratedTerminal\"` (or `\"externalTerminal\"`).\n3. Set a breakpoint on the `hook start` line.\n4. Press **Stop**.\n\n##### Current Result\nThe JVM is killed: the breakpoint is not hit and `hook start` is not printed in the terminal.\n\n##### Expected Result\nThe same as with `internalConsole`: the JVM gets SIGTERM, the debugger stays attached, the shutdown-hook breakpoint is hit, and the session ends when the JVM exits.\n\n##### Additional Informations\n`TerminateRequestHandler` calls `debugSession.terminate()`, and [`DebugSession.terminate()`](https://github.com/microsoft/java-debug/blob/main/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/DebugSession.java) does:\n\n```java\nif (vm.process() != null && vm.process().isAlive()) {\n    vm.process().destroy();\n} else if (vm.process() == null || vm.process().isAlive()) {\n    vm.exit(0);\n}\n```\n\nIn terminal mode the debuggee is started through `runInTerminal` and connects to a `ListeningConnector`, so `vm.process()` is `null` and the code falls back to `vm.exit(0)`. JDWP `VirtualMachine.Exit` ends the JVM without running shutdown hooks.\n\n`DebuggeeProcessHelper.terminate()` can already destroy the process by `context.getProcessId()`, but it is only used when there is no debug session (`noDebug`). Even there it does not point to the JVM: VS Code's `runInTerminal` response gives the PID of the terminal shell, not of the debuggee.\n","author":{"url":"https://github.com/danilaslynko","@type":"Person","name":"danilaslynko"},"datePublished":"2026-11-12T21:13:50Z","url":"https://github.com/microsoft/vscode-java-debug/issues/1732"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d4e12da6-ea6b-11aa-b88b-7b6a2ec71883
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDCE4:1D11BA:1D4FB9:29CA75:6AF7487C
html-safe-noncea9bdb796a0f7d8276bff5b6f9c61c04465a7934c9094dd03559e3c80fca97f27
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQ0U0OjFEMTFCQToxRDRGQjk6MjlDQTc1OjZBRjc0ODdDIiwidmlzaXRvcl9pZCI6IjE2MzUxMDgyOTM0OTMzNDQzODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac05226b040e82ec87534a72b7298c483f3bc93b432ba276a51e295caaba3afce5
hovercard-subject-tagissue:6359147534
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/microsoft/vscode-java-debug/1732/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d2861e8d9bacd40dcc0c4df47522734bb5b8c9bf6ab6557452a718e84260e264/microsoft/vscode-java-debug/issues/1732
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d2861e8d9bacd40dcc0c4df47522734bb5b8c9bf6ab6557452a718e84260e264/microsoft/vscode-java-debug/issues/1732
og:image:altFollow-up to #1720 (fixed by microsoft/java-debug#645). Since 0.60.2026102705, the first Stop sends terminate, keeps JDI attached, and the JVM shuts down gracefully, so breakpoints in shutdown hook...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedanilaslynko
hostnamegithub.com
expected-hostnamegithub.com
None4494f30df164445f3982ac48dcefb5f11a2d1e1f60dbda4bc38699650f7bda40
turbo-cache-controlno-preview
go-importgithub.com/microsoft/vscode-java-debug git https://github.com/microsoft/vscode-java-debug.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id102584737
octolytics-dimension-repository_nwomicrosoft/vscode-java-debug
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id102584737
octolytics-dimension-repository_network_root_nwomicrosoft/vscode-java-debug
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
releasec5e54d8b38df3667eb26cd4f3ee42355f44e009c
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/vscode-java-debug/issues/1732#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fvscode-java-debug%2Fissues%2F1732
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%2Fmicrosoft%2Fvscode-java-debug%2Fissues%2F1732
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=microsoft%2Fvscode-java-debug
Reloadhttps://github.com/microsoft/vscode-java-debug/issues/1732
Reloadhttps://github.com/microsoft/vscode-java-debug/issues/1732
Reloadhttps://github.com/microsoft/vscode-java-debug/issues/1732
microsofthttps://github.com/microsoft
vscode-java-debughttps://github.com/microsoft/vscode-java-debug
Codehttps://github.com/microsoft/vscode-java-debug
Issues202 (202)https://github.com/microsoft/vscode-java-debug/issues
Pull requests7 (7)https://github.com/microsoft/vscode-java-debug/pulls
Discussionshttps://github.com/microsoft/vscode-java-debug/discussions
Actionshttps://github.com/microsoft/vscode-java-debug/actions
Wikihttps://github.com/microsoft/vscode-java-debug/wiki
Security and qualityhttps://github.com/microsoft/vscode-java-debug/security
Insightshttps://github.com/microsoft/vscode-java-debug/pulse
https://github.com/microsoft/vscode-java-debug
New issuehttps://github.com/login?return_to=https://github.com/microsoft/vscode-java-debug/issues/1732
New issuehttps://github.com/login?return_to=https://github.com/microsoft/vscode-java-debug/issues/1732
Stop with integratedTerminal/externalTerminal still uses vm.exit(0), shutdown hooks do not runhttps://github.com/microsoft/vscode-java-debug/issues/1732#top
ai-triagedhttps://github.com/microsoft/vscode-java-debug/issues?q=state%3Aopen%20label%3A%22ai-triaged%22
bughttps://github.com/microsoft/vscode-java-debug/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/danilaslynko
danilaslynkohttps://github.com/danilaslynko
on Nov 12, 2026https://github.com/microsoft/vscode-java-debug/issues/1732#issue-6359147534
#1720https://github.com/microsoft/vscode-java-debug/issues/1720
microsoft/java-debug#645https://github.com/microsoft/java-debug/pull/645
#1720https://github.com/microsoft/vscode-java-debug/issues/1720
Stop detaches the debugger before shutdown hooks run, so JVM shutdown cannot be debugged #1720https://github.com/microsoft/vscode-java-debug/issues/1720
DebugSession.terminate()https://github.com/microsoft/java-debug/blob/main/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/DebugSession.java
issuelenshttps://github.com/apps/issuelens
ai-triagedhttps://github.com/microsoft/vscode-java-debug/issues?q=state%3Aopen%20label%3A%22ai-triaged%22
bughttps://github.com/microsoft/vscode-java-debug/issues?q=state%3Aopen%20label%3A%22bug%22
on Nov 12, 2026https://github.com/microsoft/vscode-java-debug/issues/1732#event-35963032220
https://github.com/apps/issuelens
issuelenshttps://github.com/apps/issuelens
on Nov 12, 2026https://github.com/microsoft/vscode-java-debug/issues/1732#issuecomment-6836224158
IssueLenshttps://github.com/microsoft/IssueLens
#1720https://github.com/microsoft/vscode-java-debug/issues/1720
#1720https://github.com/microsoft/vscode-java-debug/issues/1720
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/vscode-java-debug/issues/1732
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/vscode-java-debug/issues/1732
ai-triagedhttps://github.com/microsoft/vscode-java-debug/issues?q=state%3Aopen%20label%3A%22ai-triaged%22
bughttps://github.com/microsoft/vscode-java-debug/issues?q=state%3Aopen%20label%3A%22bug%22
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.