microsoft / microsoft/vscode-java-debug

Function breakpoint on constructor does not work e.g. java.io.PrintStream#PrintStream

Open
#1,331 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triaged breakpoint bug feature request
Dominant language
TypeScript
Stars
591
Forks
429
Avg merge
1d 9h
Merged PRs (30d)
19

Description

Function breakpoint on constructor does not work using syntax like java.io.PrintStream#PrintStream . I can set function breakpoint on methods like java.io.PrintStream#println .

In any program set function breakpoint on constructor of a library class constructor such as java.io.PrintStream#PrintStream or even user class:

package p;

public class UC {
    public UC() {
        System.out.println("In UC CTOR"); // Function breakpoint p.UC#UC should work and stop here.
    }
    public static void main(String[] args) {
        UC uc = new UC();
    }
}

Set function breakpoint: p.UC#UC

Current Result

Both function breakpoints java.io.PrintStream#PrintStream and p.UC#UC for constructors don't work.

Expected Result

Function breakpoints on constructors should work.

Additional Informations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided p.UC example and the java.io.PrintStream#PrintStream breakpoint, comparing them with the working println breakpoint. Trace the Java debugger's function-breakpoint handling for constructor names, then verify that both library and user-class constructor breakpoints stop at the constructor body.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.