Repository navigation
inline breakpoint will not work on some conditions #1414
Copy link
Copy link
Closed
microsoft/java-debug
#499Description
Activity
I have fixed this bug , by the following codes:
public class LambdaExpressionLocator extends ASTVisitor { public String getMethodSignature() { if (!this.found) { return null; } String result=BindingUtils.toSignature(this.lambdaMethodBinding); result=adjustSignature(result); return result; } public Integer getPeerAngleBracket(String sigResult,Integer currIdx) { int len=sigResult.length(); int deep=0; for (int i=currIdx; i<len; i++) { char iChar = sigResult.charAt(i); if (iChar == '<') { deep++; } else if (iChar == '>') { if (deep == 0) { return i; } else { deep--; } } } return -1; } public String adjustSignature(String sigStr) { String sigResult = sigStr; while(true) { Integer firstIdx = sigResult.indexOf("<"); if (firstIdx < 0 ) { break; } Integer currIdx = firstIdx+1; Integer secondIdx = getPeerAngleBracket(sigResult,currIdx); if (secondIdx < 0 ) { break; } sigResult=sigResult.substring(0,firstIdx)+sigResult.substring(secondIdx+1); } return sigResult; } }if use JDK version: 17 , all inline breakpoints will not work for both VSCode (debugger for java) and Eclipse.
testforstephen commented
on Dec 1, 2023 ContributorMore actionszcaij (@xinqingyaohao) Would you mind creating a pull request at https://github.com/microsoft/java-debug?
- Hello, My network connection to git hub is very unstable, would you mind please help to pull request these codes? Only one file should be modified , com/microsoft/java/debug/LambdaExpressionLocator.java…---- Replied Message ---- | From | Jinbo ***@***.***> | | Date | 12/01/2023 15:10 | | To | ***@***.***> | | Cc | ***@***.***>***@***.***> | | Subject | Re: [microsoft/vscode-java-debug] inline breakpoint will not work on some conditions (Issue #1414) | @xinqingyaohao Would you mind creating a pull request at https://github.com/microsoft/java-debug? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: ***@***.***>
- linked a pull request that will close this issueFix generic return type lambda breakpoint issue. Fix #1359 #499
on Dec 5, 2023
Metadata
Metadata
Assignees
Labels
No labels
Environment
Environment