<type>documentation</type>
<domain>debug</domain>
<id>advanced-data-display</id>
<title>Advanced Data Display</title>
<date>$Date$</date>
<version>$Revision$</version>
<product>all</product>

Wing handles debug data conservatively to avoid invoking code that might cause unexpected
changes in debug program state, hanging, crashing, thread deadlocks, and other problems
that can occur if the debugger exercises code in a way that it was not designed to handle.
Some advanced options are provided on the ``Debugger > Introspection`` preferences page, to
allow Wing to inspect data more deeply:

* `Resolve Properties <script:show_preferences_gui#prefname="debug.resolve-properties">`__ 
  enables calling ``fget()`` on properties so that properties can be shown
  in the ``Stack Data`` tool.  This is off by default since calling property methods may changed 
  program state unexpectedly, cause threading deadlocks, and bring out bugs 
  in properties code not seen during regular execution.

* `Allow Calls in Data Inspection <script:show_preferences_gui#prefname="debug.allow-dynamic-introspection">`__ 
  enables calling user-defined ``__len__``, ``__getitem__``, ``__call__`` and similar
  special methods during data inspection.  By default, Wing only calls these if implemented
  in C code, as for Python's standard data structures.
  
* `Call Python __repr__ Methods <script:show_preferences_gui#prefname="debug.allow-bytecode-repr">`__
  enables calling ``__repr__`` even if it is implemented in Python.  This is enabled
  by default, since it is usually safe, but may be disabled for cases where these 
  calls cause problems.  Known cases where this option must be disabled include 
  SQL database implementations that include all of very large query results in the ``repr``.

* `Inspect Base Classes <script:show_preferences_gui#prefname="debug.max-base-classes">`__ 
  controls whether Wing will try to inspect base classes for class attributes. This
  is enabled by default, since it is usually safe, but may be disabled for cases where
  it causes problems. Known cases where this option must be disabled include ``openerp``
  and ``odoo``, since they crash on inspection of some base classes.
  
When any of these options cause errors in the debugger, Wing will try to continue inspection
of other data values whenever possible and mark the offending values with ``<error handling value>``.
However, if the inspection causes the debug process to crash or deadlock, Wing will fail
to identify which value caused the problem, and the debug session will end.

If you are having problems with the debug process crashing unexpectedly while paused in 
Wing's debugger, try disabling all of the above options and then reenabling those that you
need one at a time.

More information can be obtained about failures caused by these options by enabling
additional debugger logging with the `Debugger > Diagnostics > Debug Internals Log File 
<script:show_preferences_gui#prefname="debug.logfile">`__ preference.
