Skip to content

Commit 87fae71

Browse files
Support set exception breakpoint asynchronously & bump veriosn to 0.45.0 (#482)
* Support set exception breakpoint asynchronously & bump veriosn to 0.45.0
1 parent 9df6f5d commit 87fae71

File tree

11 files changed

+28
-11
lines changed

11 files changed

+28
-11
lines changed

com.microsoft.java.debug.core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.microsoft.java</groupId>
77
<artifactId>java-debug-parent</artifactId>
8-
<version>0.44.0</version>
8+
<version>0.45.0</version>
99
</parent>
1010
<artifactId>com.microsoft.java.debug.core</artifactId>
1111
<packaging>jar</packaging>

com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/DebugSession.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,18 @@ public void setExceptionBreakpoints(boolean notifyCaught, boolean notifyUncaught
226226
}
227227
}
228228

229+
@Override
230+
public void setExceptionBreakpoints(boolean notifyCaught, boolean notifyUncaught, String[] exceptionTypes,
231+
String[] classFilters, String[] classExclusionFilters, boolean async) {
232+
if (async) {
233+
AsyncJdwpUtils.runAsync(() -> {
234+
setExceptionBreakpoints(notifyCaught, notifyUncaught, exceptionTypes, classFilters, classExclusionFilters);
235+
});
236+
} else {
237+
setExceptionBreakpoints(notifyCaught, notifyUncaught, exceptionTypes, classFilters, classExclusionFilters);
238+
}
239+
}
240+
229241
@Override
230242
public Process process() {
231243
return vm.process();

com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/IDebugSession.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public interface IDebugSession {
4040

4141
void setExceptionBreakpoints(boolean notifyCaught, boolean notifyUncaught, String[] exceptionTypes, String[] classFilters, String[] classExclusionFilters);
4242

43+
void setExceptionBreakpoints(boolean notifyCaught, boolean notifyUncaught, String[] exceptionTypes, String[] classFilters, String[] classExclusionFilters,
44+
boolean async);
45+
4346
IMethodBreakpoint createFunctionBreakpoint(String className, String functionName, String condition, int hitCount);
4447

4548
Process process();

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public class SetExceptionBreakpointsRequestHandler implements IDebugRequestHandl
3838
private boolean isInitialized = false;
3939
private boolean notifyCaught = false;
4040
private boolean notifyUncaught = false;
41+
private boolean asyncJDWP = false;
4142

4243
@Override
4344
public List<Command> getTargetCommands() {
@@ -53,6 +54,7 @@ public synchronized CompletableFuture<Response> handle(Command command, Argument
5354
if (!isInitialized) {
5455
isInitialized = true;
5556
debugSession = context.getDebugSession();
57+
asyncJDWP = context.asyncJDWP();
5658
DebugSettings.addDebugSettingChangeListener(this);
5759
debugSession.getEventHub().events().subscribe(debugEvent -> {
5860
if (debugEvent.event instanceof VMDeathEvent
@@ -81,7 +83,7 @@ private void setExceptionBreakpoints(IDebugSession debugSession, boolean notifyC
8183
String[] exceptionTypes = (exceptionFilters == null ? null : exceptionFilters.exceptionTypes);
8284
String[] classFilters = (exceptionFilters == null ? null : exceptionFilters.allowClasses);
8385
String[] classExclusionFilters = (exceptionFilters == null ? null : exceptionFilters.skipClasses);
84-
debugSession.setExceptionBreakpoints(notifyCaught, notifyUncaught, exceptionTypes, classFilters, classExclusionFilters);
86+
debugSession.setExceptionBreakpoints(notifyCaught, notifyUncaught, exceptionTypes, classFilters, classExclusionFilters, this.asyncJDWP);
8587
}
8688

8789
@Override

com.microsoft.java.debug.plugin/.classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
<classpathentry kind="src" path="src/main/java"/>
1212
<classpathentry exported="true" kind="lib" path="lib/rxjava-2.2.21.jar"/>
1313
<classpathentry exported="true" kind="lib" path="lib/reactive-streams-1.0.4.jar"/>
14-
<classpathentry exported="true" kind="lib" path="lib/com.microsoft.java.debug.core-0.44.0.jar" sourcepath="/com.microsoft.java.debug.core"/>
14+
<classpathentry exported="true" kind="lib" path="lib/com.microsoft.java.debug.core-0.45.0.jar" sourcepath="/com.microsoft.java.debug.core"/>
1515
<classpathentry kind="output" path="target/classes"/>
1616
</classpath>

com.microsoft.java.debug.plugin/META-INF/MANIFEST.MF

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: Java Debug Server Plugin
44
Bundle-SymbolicName: com.microsoft.java.debug.plugin;singleton:=true
5-
Bundle-Version: 0.44.0
5+
Bundle-Version: 0.45.0
66
Bundle-RequiredExecutionEnvironment: JavaSE-11
77
Bundle-ActivationPolicy: lazy
88
Bundle-Activator: com.microsoft.java.debug.plugin.internal.JavaDebuggerServerPlugin
@@ -25,4 +25,4 @@ Bundle-ClassPath: lib/commons-io-2.11.0.jar,
2525
.,
2626
lib/rxjava-2.2.21.jar,
2727
lib/reactive-streams-1.0.4.jar,
28-
lib/com.microsoft.java.debug.core-0.44.0.jar
28+
lib/com.microsoft.java.debug.core-0.45.0.jar

com.microsoft.java.debug.plugin/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.microsoft.java</groupId>
77
<artifactId>java-debug-parent</artifactId>
8-
<version>0.44.0</version>
8+
<version>0.45.0</version>
99
</parent>
1010
<artifactId>com.microsoft.java.debug.plugin</artifactId>
1111
<packaging>eclipse-plugin</packaging>
@@ -56,7 +56,7 @@
5656
<artifactItem>
5757
<groupId>com.microsoft.java</groupId>
5858
<artifactId>com.microsoft.java.debug.core</artifactId>
59-
<version>0.44.0</version>
59+
<version>0.45.0</version>
6060
</artifactItem>
6161
</artifactItems>
6262
</configuration>

com.microsoft.java.debug.repository/category.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<site>
3-
<bundle id="com.microsoft.java.debug.plugin" version="0.44.0">
3+
<bundle id="com.microsoft.java.debug.plugin" version="0.45.0">
44
<category name="javadebug" />
55
</bundle>
66
<category-def name="javadebug" label="Java Debug Server"/>

com.microsoft.java.debug.repository/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.microsoft.java</groupId>
66
<artifactId>java-debug-parent</artifactId>
7-
<version>0.44.0</version>
7+
<version>0.45.0</version>
88
</parent>
99
<artifactId>com.microsoft.java.debug.repository</artifactId>
1010
<packaging>eclipse-repository</packaging>

com.microsoft.java.debug.target/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.microsoft.java</groupId>
66
<artifactId>java-debug-parent</artifactId>
7-
<version>0.44.0</version>
7+
<version>0.45.0</version>
88
</parent>
99
<artifactId>com.microsoft.java.debug.tp</artifactId>
1010
<name>${base.name} :: Target Platform</name>

0 commit comments

Comments
 (0)