Skip to content

Support method breakpoints #424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 28, 2022
Merged

Conversation

testforstephen
Copy link
Contributor

@testforstephen testforstephen commented Jun 27, 2022

Add support for function breakpoint for java, this will resolve microsoft/vscode-java-debug#258. The current version support adding a function breakpoint with the following syntax.

FullyQualifiedClassName#methodName

like

java.util.ArrayList#add

The current version doesn't consider parameter signatures.

This PR is based on PR #418, and addresses the additional issues as follows:

  • Handle the duplicated MethodEntryEvent better.
  • Update the reason of BreakpontEvent to be 'changed'.
  • Fix checkstyle issues.

Thanks to the initial contribution from @gayanper.

@jdneo
Copy link
Member

jdneo commented Jun 28, 2022

Overall, the new functionality works well. One concern is about the inner class case.

Since we require binary name here, so user has to use $ as the separator. Is there any way to give users some hints when . is misused in that case?

@testforstephen
Copy link
Contributor Author

testforstephen commented Jun 28, 2022

Overall, the new functionality works well. One concern is about the inner class case.

Since we require binary name here, so user has to use $ as the separator. Is there any way to give users some hints when . is misused in that case?

Agreed, currently adding a function breakpoint from the BREAKPOINTS panel is very limited and we need a more user friendly way to guide the user in enabling function breakpoints.

As a first release, I will keep the current implementation. I opened an issue in microsoft/vscode-java-debug#1183 and hope to improve function breakpoints in the next release.

@testforstephen testforstephen merged commit 9bb9832 into microsoft:main Jun 28, 2022
@testforstephen testforstephen deleted the funcbp branch June 28, 2022 09:32
@testforstephen testforstephen restored the funcbp branch June 28, 2022 09:34
testforstephen added a commit that referenced this pull request Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support function breakpoints
3 participants