a cosmetic change in groovy debugger evaluation which seems to help with blinking...
authorpeter <peter@jetbrains.com>
Wed, 4 Feb 2015 17:39:27 +0000 (18:39 +0100)
committerpeter <peter@jetbrains.com>
Wed, 4 Feb 2015 17:43:02 +0000 (18:43 +0100)
 debugged vm sometimes can't find java.lang.StackTraceElement class and check that its array can be passed to Arrays.toString. Looks like a JVM concurrency issue because in a second attempt to find the class it's returned successfully.

plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/GroovyCodeFragmentFactory.java

index 76bab69dabac245d77f76c02784c5fd75384db69..942ccef8f4cbf04b511985f82c43aff1cbd94397 100644 (file)
@@ -114,8 +114,9 @@ public class GroovyCodeFragmentFactory extends CodeFragmentFactory {
       //javaText.append("System.out.println(java.util.Arrays.toString(new Exception().getStackTrace()));\n");
       //javaText.append("System.out.println(\"\\\\[([^,()]+\\\\$\\\\$)[A-Za-z0-9]{8}(\\\\.[^,()]+)\\\\(" + s + ":\\\\d+\\\\), (\\\\1[A-Za-z0-9]{8}\\\\2\\\\(Unknown Source\\\\), |.+(?:com|org)\\\\.springsource\\\\.loaded\\\\.).+\")\n");
 
+      javaText.append("Object[] |trace = new Exception().getStackTrace();\n");
       javaText.append(
-        "if (java.util.Arrays.toString(new Exception().getStackTrace()).matches(\"\\\\[([^,()]+\\\\$\\\\$)[A-Za-z0-9]{8}(\\\\.[^,()]+)\\\\(")
+        "if (java.util.Arrays.toString(|trace).matches(\"\\\\[([^,()]+\\\\$\\\\$)[A-Za-z0-9]{8}(\\\\.[^,()]+)\\\\(")
         .append(s)
         .append(
           ":\\\\d+\\\\), (\\\\1[A-Za-z0-9]{8}\\\\2\\\\(Unknown Source\\\\), $OR$.+(?:com$OR$org)\\\\.springsource\\\\.loaded\\\\.).+\")) {\n");