For example, let's say my last line is :
var result = doSomethingComplex();
After the result is in, the debugger closes and I'll never know what the result was. Even if the function doSomethingComplex() ends with return 4, I'll never see the result of that value.
The workaround is to make an arbitrary var like var wait = "review your stuff";
You could set the returned value to scriptData with the following.
Would that suffice for your needs here ? You'll get the result in the Test Harness inspector window.