Skip to content

Stopping a Java Application with the debugger Stop button dos not work #1705

Description

@rbi

How to Reproduce

  • Just a normal Java Launch configuration e.g.
{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "java",
            "name": "MyApp",
            "request": "launch",
            "projectName": "application",
            "mainClass": "my.app.Application",
        },
  • Start the Configuration
  • Stop via the Debugger Stop Button

What happened

  • The application starts fine ...
  • ... but it doesn't stop. You have to terminate it manually by pressing CTRL+C in the terminal.

What should happen

  • Stopping via the Debugger controls should also terminate the Application at least when the launch configuration is started with "request": "launch".

Analysis
There was some analysis done by Rafael Derner (@rafael-derner) in the last comment of #1585 . This might help fix the bug. #1585 is about Gracefull shutdown not working properly. This bug is about no shutdown being attempt at all. Just killing the process like before would be better than no shutdown at all.

Activity

  1. issuelens commented on Sep 28, 2026

    @issuelens

    Thanks for the clear distinction: the JVM staying alive after Stop is a termination failure, not just shutdown hooks being skipped.

    The last comment on #1585 does describe the same visible symptom, specifically after upgrading from 0.58.5 to 0.59.0 in a Dev Container. That is a useful lead, but your versions and environment are still needed before treating these as the same underlying bug.

    The debug-server shutdown path is the likely area to investigate. The earlier change associated with #1585 detached the debugger before requesting termination. The current server handler instead requests termination before detaching. This does not establish that your installed extension contains that newer behavior or that it resolves your case.

    Could you share:

    • VS Code, Debugger for Java, Language Support for Java, and application JDK versions; OS; and whether this runs locally, in WSL, over SSH, or in a Dev Container.
    • A minimal reproducing application and the complete launch configuration, with sensitive values removed, including any console setting.
    • Whether the debug toolbar/session disappears after Stop while the original Java process remains alive, and whether Run Without Debugging stops correctly.

    For now, the terminal Ctrl+C workaround you identified is the practical way to stop the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions