Debugging Groovy scripted pipelines in Jenkins : <p>I'm developing Jenkins pipelines as Groovy scripts (scripted pipelines, not declarative), and having a real hard time. Jenkins is always very generic regarding syntax/semantic errors, outputting stacks like below:</p>

<pre><code>groovy.lang.MissingPropertyException: No such property: caughtError for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)
at
</code></pre>

<p>So I have to figure where the error is completely by myself, inspecting line per line of code.
Is there a better way to  debug it? What you guys use to do?</p>
