Apache Struts 2 Documentation > Home > Guides > Core Developers Guide > Debugging |

Apache Struts 2 Documentation
Debugging
Edit Page Browse Space Add Page Add News
Added by Ted Husted, last edited by Ted Husted on Nov 13, 2006 (view change)

Modern IDEs provide excellent support for debugging. In addition, the framework provides support for inspecting framework-specific objects at runtime.

The DebuggingInterceptor provides two debugging mode to provide insight into the data behind the page. The `xml` mode formats relevant framework objects as an XML document. The `console` mode provides a OGNL command line that accepts entry of runtime expressions.

To use the debugging, first be sure that `devmode` is enabled through the struts.properties file.

- `devmode = true`

Then, whenever a page needs debugging, add `?debug=xml` or `?debug=console` to the URL.

- `http://www.planetstruts.org/struts2-showcase/showcase.action?debug=xml`

    - <debug>
      <parameters />
    - <context>
    - <struts.actionMapping>
      <class>class org.apache.struts2.dispatcher.mapper.ActionMapping</class>
      <name>showcase</name>
      <namespace>/</namespace>
      </struts.actionMapping>
      <attr />
      <__devMode>true</__devMode>
      <report.conversion.errors>false</report.conversion.errors>
      </context>
      <request />
      <session />
    - <valueStack>
    - <value>
      <actionErrors />
      <actionMessages />
      <class>class com.opensymphony.xwork2.ActionSupport</class>
      <errorMessages />
      <errors />
      <fieldErrors />
    - <locale>
      <ISO3Country>USA</ISO3Country>
      <ISO3Language>eng</ISO3Language>
      <class>class java.util.Locale</class>
      <country>US</country>
      <displayCountry>United States</displayCountry>
      <displayLanguage>English</displayLanguage>
      <displayName>English (United States)</displayName>
      <displayVariant />
      <language>en</language>
      <variant />
      </locale>
      </value>
    - <value>
      <class>class com.opensymphony.xwork2.DefaultTextProvider</class>
      </value>
      </valueStack>
      </debug>

| For `?debug=xml` use Internet Explorer or an IE tab in FireFox

| For `?debug=console` you may need to relax any popup blockers

## Next: Zero Configuration

Children Show Children Hide Children
Zero Configuration (Apache Struts 2 Documentation)