Complete report also filed with IntelliJ Idea at https://youtrack.jetbrains.com/issue/IDEA-198280
In the following code snippet:
If we set a debug point at the 'println "Hello" line and go inside the try/catch using the debugger, the next line after 'int a = 123' that the debugger stops on should be 'println "what just happened?"' , but instead is 'println s'.
So the debugger jumps to the last line of the catch (visually, not any of the variables, or anything) , when visually it should be at the first line after the catch if no exception has been thrown.
This creates GREAT confusion when I'm trying to debug complex classes because it gives the impression that the catch clause has been triggered when it has not.
See attached screenshots of the step by step:
Here's what the guys at Jetbrains had to say (see link above also):
Peter Gromov commented 6 hours ago
Yes. The same problem is reproducible in Eclipse, so David P. could you please report the issue to Groovy compiler team? See http://groovy-lang.org/reporting-issues.html
Egor Ushakov commented 7 hours ago
Peter Gromov it seems that groovy compiler does not generate line info for the location right after the try block (but stops there in debugger).