apache / apache/netbeans

[VS Code extension] Debug process remains after stopping debug session

Open
#4,588 0 comments 0 reactions 0 assignees View on GitHub
kind:bug needs:triage VSCode Extension
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 14

### What happened

After starting then stopping a debug session, if the running application code process does not exit cleanly then a gradle and application process lingers in the background, even after exiting VS Code.

This causes issues with subsequent debugging sessions, even after vscode restart, because the debugger could not launch the process - the remote debugger port is already in use.

### How to reproduce

Unfortunately I cannot share the project to repro this, but it is a Spring Boot project that uses Kafka libraries and makes several outgoing network connections. When stopping the debug session, I presume the application process remains frozen waiting on network traffic. It does not respond to `SIGTERM` and must be sent a `SIGKILL` manually to clean it up.

1. Open project in VS Code with Netbeans LS
2. F5 to start debugging
3. Hit a breakpoint; click to stop debugging
4. Exit VS Code
5. Repeat steps and observe failure to launch debugging session

### Did this work correctly in an earlier version?

No / Don't know

### Operating System

MacOS 12.6.1

### JDK

17 (AdoptOpenJDK)

### Apache NetBeans packaging

Apache VSNetBeans for VSCode

### Anything else

_No response_

### Are you willing to submit a pull request?

No

### Code of Conduct

Yes

Contributor guide

Open the contributing guide

Research direction

The issue names no source file or test. Start by reproducing the VS Code NetBeans LS debugging flow with a Spring Boot project, then inspect how stopping the session handles the Gradle and application processes. Done means the processes exit cleanly and a subsequent debugging session can launch without the remote debugger port remaining in use.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kafka, spring-boot, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.