You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This finishes wiring up the TEST_JAVA_ARGS CMake variable to allow
builders to override the JVM flags during unit test runs. We can then
use that to instantiate a remote debug server as a workaround for
debugging ACCP.
Copy file name to clipboardexpand all lines: DEVELOPMENT-GUIDE.md
+24-1
Original file line number
Diff line number
Diff line change
@@ -191,4 +191,27 @@ So, when you are in a critical region there are exceedingly few operations you c
191
191
Essentially, all you can do is methods which manipulate your critical region until you get out of it.
192
192
It is **extremely important** that you do not allocate *any* Java memory (such as creating Java objects, like a Java Exception), call *any* Java methods (which you shouldn't be doing anyway), or take any actions which may block.
193
193
It is also **very important** that you don't spend too much time (more than about a millisecond) in a critical region.
194
-
If you are concerned that an operation is not reasonably time-bounded, you should probably be sure to release the critical region on a regular basis to ensure the JVM has the opportunity to do needed memory management. (This isn't always achievable when everything is happening within a single atomic cryptographic operation.)
194
+
If you are concerned that an operation is not reasonably time-bounded, you should probably be sure to release the critical region on a regular basis to ensure the JVM has the opportunity to do needed memory management. (This isn't always achievable when everything is happening within a single atomic cryptographic operation.)
195
+
196
+
# Java Debugger Support
197
+
Due to ACCP's unconventional build system, IDEs are not able to automatically configure, run, and debug the unit tests.
198
+
This is largely because of how we use of Gradle/CMake to run the unit tests via the JUnit CLI which allows us to
199
+
incorporate the natively compiled portion of the library. A simple workaround is to use the singleTest task along with
200
+
JVM arguments to start a remote Java debugger session. This then allows you to connect and debug your test in the IDE.
201
+
202
+
```
203
+
# 1. Create a new Run/Debug Configuration for "Remote JVM Debug" in IntelliJ or the equivalent for your IDE.
204
+
205
+
# 2. Launch your test target using the singlelTest target. n.b. Suspend is set to y to break immediately.
0 commit comments