microsoft / microsoft/vscode-java-debug
Function breakpoint on methods of static inner classes does not work
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 591
- Forks
- 429
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 19
Description
I am able to set the function breakpoint on methods of top level class e.g.
com.example.starstar.StarstarApplication#main
but the same does not work for methods of inner static class methods e.g.
com.example.starstar.StarstarApplication.RootController#root
@SpringBootApplication
public class StarstarApplication {
public static void main(String[] args) {
SpringApplication.run(StarstarApplication.class, args);
}
@RestController
public static class RootController {
@GetMapping("/")
public String root() {
return "Hello World";
}
}
}
Environment
- Operating System: Any
- JDK version: JDK17
- Visual Studio Code version: 1.79.2
- Java extension version: v1.20.0
- Java Debugger extension version: v0.52.0
Steps To Reproduce
- Set function breakpoint on method of top level class
- Set function breakpoint on method of static inner class
Run the program.
The function breakpoint on method of top level class works.
The function breakpoint on method of static inner class does not work.
Current Result
The function breakpoint on method of static inner class does not work.
Expected Result
The function breakpoint on method of static inner class should work.
Additional Information
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the function-breakpoint behavior with the provided StarstarApplication example, comparing top-level main with static inner RootController#root on JDK 17. Trace how the Java debugger resolves each method breakpoint; done means the inner-class method breakpoint binds and stops when the root endpoint runs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100