How to debug a D2W application

Last modified by Ted Petrosky on 2013/05/03 09:32

The first step is to turn on D2W debug mode in your app Properties file (if it isn't already).
 Set:

er.extensions.ERXApplication.developmentMode = true

Walk-through

Loading the video player...

a

Advanced D2W Debugging

One of the most common problems to occur in a D2W application is that your rule that you've added just doesn't seem to be processed.
 There is a very useful tool to find out what rules are being processed to compute values for D2W keys:

D2W rule tracing.

D2W Rule Tracing

Probably the easiest way to get rule tracing output is to add the following property in your run configuration in Eclipse (it's in the WO-Tab):

-D2WTraceRuleFiringEnabled true

When you run your application you will get output in the Eclipse console that looks like this:

Unknown macro: noformat. Click on this message for details.

Another way to turn on rule tracing is in your app Properties:

log4j.logger.er.directtoweb.rules.ERD2WTraceRuleFiringEnabled = DEBUG

Then say you were trying to debug what rule, or set of rules, were being processed to determing the class string applied to a Diva look component, you set:

Unknown macro: noformat. Click on this message for details.

Now when you launch your application and navigate to the page and/or component in question, you will see in the Console output, the D2W rules fired to determine the class.