You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by WHIRLYCOTT <ph...@whirlycott.com> on 2004/06/03 21:33:41 UTC

question about debugging

I'm new to Cocoon and I'm working on modifying an existing Cocoon 
application for a client.  I'm finding that the process I'm using to add 
new features to the pre-existing codebase is error prone and I'm 
wondering if people can provide their thoughts on some of the following 
topics and possibly even share the approaches you use, how your dev 
environment is set up, etc.

* At times, I want to simply peek at the value of a session attribute, 
request attribute, etc. at a certain point in a pipeline.  If I was 
writing straight-up Java code, I could print out the value using log4j 
or something like this, look for the corresponding output in a log file 
and make some analysis.  How do you go about doing this in your Cocoon 
sitemaps?  Or do you do it differently altogether?

* I seem to be consistently making incorrect assumptions about the 
scoping of request attributes, session attributes, etc. during the 
course of executing a particular pipeline.  For example, I should be 
seeing a particular request attribute at a certain point in one of my 
pipelines, but it's apparently not there.  I'm wondering if this has to 
do with a <map:act> block surrounding the code in question?   Thoughts, 
links to docs for me to read, etc.?

I'm sure that some of you might be thinking that you need some code 
samples in order to tell me what's possibly wrong, but I'm looking for 
some more general wisdom of how _you_ are debugging problems in your 
pipelines, transformers, actions, etc.

Right now, I'm relying on <map:serializer type="xml"/> statements being 
sprinkled throughout my code so that I can see what's happening by 
looking at a chunk of XML in my browser.  I find that this approach is 
really inefficient and I'm looking for ways to improve it.

I've also noticed that the vast majority of messages that get logged by 
Cocoon are DEBUG, even, for example, errors that are kicked back by my 
database server when a SQL INSERT statement fails.  This also makes it 
trickier to cut down on the ~80Kb of log messages that are being 
generated per request in my dev setup.

I'd appreciate any thoughts on the topic of debugging in your 
development environments and any techniques that you use.

phil.


-- 
                                   Whirlycott
                                   Philip Jacob
                                   phil@whirlycott.com
                                   http://www.whirlycott.com/phil/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: question about debugging

Posted by Ralph Goers <Ra...@dslextreme.com>.
I either have logging in my component or I use IntelliJ and attach it to
the servlet container and do remote debugging.


WHIRLYCOTT said:
> I'm new to Cocoon and I'm working on modifying an existing Cocoon
> application for a client.  I'm finding that the process I'm using to add
> new features to the pre-existing codebase is error prone and I'm
> wondering if people can provide their thoughts on some of the following
> topics and possibly even share the approaches you use, how your dev
> environment is set up, etc.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org