Skip to content

Commit 700637c

Browse files
authored
fix unsupported breakpoint at method entry/exit or class (#129)
* Add location type check on breakpoint Add location type check to avoid breakpoint on method/field which will never be hit in current implementation. * fix breakpoint pos update lines to the next line which is valid for breakpoint * 1. add the logic to avoid duplicate install breakpoint when updated breakpoint lines have duplicate lines. * revert unneeded change. * removes invalid breakpoint * fix checkstyle hint. * Update typo in javadoc * remove useless if condition * remove tailing spaces. * update javadoc * revert the code to modify line numbers because in vscode, the action to set breakpoint will not report to our lang server immediately * revert changes.
1 parent 405a8be commit 700637c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/JdtSourceLookUpProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ public String[] getFullyQualifiedName(String uri, int[] lines, int[] columns) th
150150
ValidBreakpointLocationLocator locator = new ValidBreakpointLocationLocator(astUnit, lines[i], true, true);
151151
astUnit.accept(locator);
152152
// When the final valid line location is same as the original line, that represents it's a valid breakpoint.
153-
if (lines[i] == locator.getLineLocation()) {
153+
// Add location type check to avoid breakpoint on method/field which will never be hit in current implementation.
154+
if (lines[i] == locator.getLineLocation() && locator.getLocationType() == ValidBreakpointLocationLocator.LOCATION_LINE) {
154155
fqns[i] = locator.getFullyQualifiedTypeName();
155156
}
156157
}

0 commit comments

Comments
 (0)