Skip to content

Commit 20ec2bf

Browse files
committed
Merge pull request #227 from JLLeitschuh/chore/keepDebugInfo
Prevents JIT from eating stack traces
2 parents 3558cd5 + d12f986 commit 20ec2bf

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

build.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ allprojects {
3333

3434
version = '0.2.1'
3535

36+
compileJava {
37+
options.compilerArgs << "-g"
38+
}
39+
3640
jacocoTestReport {
3741
reports {
3842
xml.enabled = true
@@ -184,6 +188,13 @@ project(":ui") {
184188
appID = 'GRIP'
185189
appName = 'GRIP'
186190
mainClass = "edu.wpi.grip.ui.Main"
191+
192+
// This prevents the JIT from eating stack traces that get thrown a lot
193+
// This is slower but means we actually get the stack traces instead of
194+
// having them become one line like `java.lang.ArrayIndexOutOfBoundsException`
195+
// and as such, would be useless.
196+
// See: https://plumbr.eu/blog/java/on-a-quest-for-missing-stacktraces
197+
jvmArgs = ["-XX:-OmitStackTraceInFastThrow"]
187198
}
188199
mainClassName = javafx.mainClass
189200
}

0 commit comments

Comments
 (0)