Skip to content

Conversation

@lahodaj
Copy link
Contributor

@lahodaj lahodaj commented Feb 11, 2025

Using the VS Code extension and running this code under debugger:

package test.threading;

public class ThreadingTest {

    public static void main(String[] args) {
        Thread.ofPlatform().start(() -> {
            System.err.println(); //breakpoint here
        });
    }
}

(having the line breakpoint on the marked line). The debugger does not properly stop at the breakpoint.

What I think is happening is that when the JPDAThreadImpl is created, it is already suspended inside the debuggee. As a consequence, the event that the thread was suspended does not go through, and the "UI" part of the debugger is not notified the thread was suspended.

The proposal here is to send the "thread suspended" event the first time the thread stops on a breakpoint, if it was created as already-suspended.

@lahodaj lahodaj added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) LSP [ci] enable Language Server Protocol tests VSCode Extension debugger labels Feb 11, 2025
@lahodaj lahodaj added this to the NB26 milestone Feb 11, 2025
@lahodaj lahodaj requested a review from entlicher February 11, 2025 17:28
@neilcsmith-net neilcsmith-net modified the milestones: NB26, NB27 Apr 16, 2025
@neilcsmith-net neilcsmith-net removed this from the NB27 milestone Jul 18, 2025
@neilcsmith-net neilcsmith-net marked this pull request as draft July 18, 2025 14:11
@neilcsmith-net
Copy link
Member

Removing milestone as it has conflicts and has bumped through a couple of milestones. Please retarget or close as necessary.

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

Labels

debugger Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) LSP [ci] enable Language Server Protocol tests VSCode Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants