Gibt es eine Möglichkeit, einen IntelliJ Java-Ausnahmeblockpunkt so zu konfigurieren, dass er nur ausgelöst wird, wenn die unterste Klasse im Stack-Trace eine bestimmte Klasse ist? Mit dem Stack-Trace unten möchte ich beispielsweise nur brechen, wenn die untere Zeile die Klasse ComputeLCAInBinaryTreeSpec
enthält.Konfigurieren von IntelliJ Java-Ausnahmebreakpoint
java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at com.common.BinaryTreeNode.buildBinaryTree(BinaryTreeNode.groovy:62)
at com.common.BinaryTreeNode.buildBinaryTree(BinaryTreeNode.groovy:76)
at com.common.BinaryTreeNode.buildBinaryTrees_closure1(BinaryTreeNode.groovy:53)
at groovy.lang.Closure.call(Closure.java:426)
at com.common.BinaryTreeNode.buildBinaryTrees(BinaryTreeNode.groovy:51)
at com.elementsofprogramminginterviews.binarytrees.ComputeLCAInBinaryTreeSpec.computes LCA of two nodes of a binary tree_closure1(ComputeLCAInBinaryTreeSpec.groovy:65)
at groovy.lang.Closure.call(Closure.java:426)
at groovy.lang.Closure.call(Closure.java:442)
at com.elementsofprogramminginterviews.binarytrees.ComputeLCAInBinaryTreeSpec.computes LCA of two nodes of a binary tree(ComputeLCAInBinaryTreeSpec.groovy:47)
Sie können sein in der Lage, Ausnahme-Breakpoints zu nutzen. Ich habe sie nie persönlich benutzt, aber Sie können sowohl Bedingungen als auch Filter setzen. Details finden Sie unter https://www.jetbrains.com/help/idea/2017.1/creating-exception-breakpoints.html –