Skip to content

Commit 54b1fed

Browse files
Fix the call stack matching regex expression for modules (#339)
Signed-off-by: Jinbo Wang <[email protected]>
1 parent bf689a6 commit 54b1fed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/LaunchRequestHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,12 @@ protected CompletableFuture<Response> launch(LaunchArguments launchArguments, Re
258258
return resultFuture;
259259
}
260260

261-
private static final Pattern STACKTRACE_PATTERN = Pattern.compile("\\s+at\\s+(([\\w$]+\\.)*[\\w$]+)\\(([\\w-$]+\\.java:\\d+)\\)");
261+
private static final Pattern STACKTRACE_PATTERN = Pattern.compile("\\s+at\\s+([\\w$\\.]+\\/)?(([\\w$]+\\.)*[\\w$]+)\\(([\\w-$]+\\.java:\\d+)\\)");
262262

263263
private static OutputEvent convertToOutputEvent(String message, Category category, IDebugAdapterContext context) {
264264
Matcher matcher = STACKTRACE_PATTERN.matcher(message);
265265
if (matcher.find()) {
266-
String methodField = matcher.group(1);
266+
String methodField = matcher.group(2);
267267
String locationField = matcher.group(matcher.groupCount());
268268
String fullyQualifiedName = methodField.substring(0, methodField.lastIndexOf("."));
269269
String packageName = fullyQualifiedName.lastIndexOf(".") > -1 ? fullyQualifiedName.substring(0, fullyQualifiedName.lastIndexOf(".")) : "";

0 commit comments

Comments
 (0)