{"id":5296,"date":"2014-03-30T20:30:59","date_gmt":"2014-03-30T20:30:59","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/debugging-groovy-scripts-running-in-a-scriptengine-from-eclipse-collection-of-common-programming-errors\/"},"modified":"2014-03-30T20:30:59","modified_gmt":"2014-03-30T20:30:59","slug":"debugging-groovy-scripts-running-in-a-scriptengine-from-eclipse-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/debugging-groovy-scripts-running-in-a-scriptengine-from-eclipse-collection-of-common-programming-errors\/","title":{"rendered":"Debugging Groovy scripts running in a ScriptEngine from Eclipse-Collection of common programming errors"},"content":{"rendered":"<p>I have a Groovy script which is run like this:<\/p>\n<pre><code>File scriptFile = ...;\nScriptEngine engine = ...;\nString script = FileUtils.readFileToString(scriptFile);\nObject evalResult = engine.eval(script, bindings);\n<\/code><\/pre>\n<p>Unsurprisingly, breakpoint set in the script file doesn&#8217;t trigger. What can I change to make it work? The script needs to be run in the context of the larger program (no separate launch configuration), and through a <code>ScriptEngine<\/code>, and the file is only known at runtime.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a Groovy script which is run like this: File scriptFile = &#8230;; ScriptEngine engine = &#8230;; String script = FileUtils.readFileToString(scriptFile); Object evalResult = engine.eval(script, bindings); Unsurprisingly, breakpoint set in the script file doesn&#8217;t trigger. What can I change to make it work? The script needs to be run in the context of the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5296","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5296"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5296\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}