Debugging Beanshell-scripts

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Debugging Beanshell-scripts

Fabian Gorsler
Hi,

is there any easy way to debug Beanshell-scripts in OFBiz? If I could see
their context/request/session, this would be great, but up to now I could
not find an easy way for attaching Eclipse's debugger to the OFBiz-VM
(Parameters for debugging the VM are set, the connection to the VM works.)
and having access to the fields of a BSH.

With JConsole I didn't get anything, too.

Where shall I set the breakpoints for Eclipse? What could I use else than
Eclipse?

TIA

PS: Up to now everything works really great for me, BSHs, Widgets,
Freemarker - really, great. The entity engine rocks, too. But I've had
several times the problem, that there is something missing in the request
attributes and a debugger would be much more comfortable than debugging
with print(...);...

Best regards,
Fabian.

Reply | Threaded
Open this post in threaded view
|

Re: Debugging Beanshell-scripts

Si Chen-2
Beanshell scripts are best debugged just with a Debug.log_() call.  See:
http://www.opensourcestrategies.com/ofbiz/ofbiz_debugging.txt

On Jul 24, 2006, at 4:17 AM, Fabian Gorsler wrote:

> Hi,
>
> is there any easy way to debug Beanshell-scripts in OFBiz? If I  
> could see
> their context/request/session, this would be great, but up to now I  
> could
> not find an easy way for attaching Eclipse's debugger to the OFBiz-VM
> (Parameters for debugging the VM are set, the connection to the VM  
> works.)
> and having access to the fields of a BSH.
>
> With JConsole I didn't get anything, too.
>
> Where shall I set the breakpoints for Eclipse? What could I use  
> else than
> Eclipse?
>
> TIA
>
> PS: Up to now everything works really great for me, BSHs, Widgets,
> Freemarker - really, great. The entity engine rocks, too. But I've had
> several times the problem, that there is something missing in the  
> request
> attributes and a debugger would be much more comfortable than  
> debugging
> with print(...);...
>
> Best regards,
> Fabian.

Reply | Threaded
Open this post in threaded view
|

Re: Debugging Beanshell-scripts

Fabian Gorsler
Hi Si,

Si Chen wrote:
 > Beanshell scripts are best debugged just with a Debug.log_() call.  See:
 > http://www.opensourcestrategies.com/ofbiz/ofbiz_debugging.txt


well, I've read this already. It's not really that what I want. It seems
- because that's the best way as you say - that there will be no other
way for debugging.

Tomorrow I'll check the handler stuff for BSHs again, anywhere must be
the row, where the handler passes the objects to the BSH engine... For
me debugging with looking at all field values, will be the best and
easiest way.

Thanks for your answer.

Best regards,
Fabian.

Reply | Threaded
Open this post in threaded view
|

Re: Debugging Beanshell-scripts

Fabian Gorsler
Hi,

I forgot to write, that I'm using still print(), but now with the objects
context/globalContext. They have nice toString()-methods with many, many
information - and for luck I've searched exactly those information. :)

PS: Those debugging actions I'm doing at the moment don't require the use
of the whole Debug.log_() thing. They are just temporarily.

Best regards,
Fabian.