Change 20070913-ptw-P by [EMAIL PROTECTED] on 2007-09-13 08:34:45 EDT
    in /Users/ptw/OpenLaszlo/wafflecone
    for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone

Summary: Add Debug.bugReport

New Features:
    The `bugReport` method of the Debugger can be used to create a
    report suitable for copy/pasting into a bug report.

Bugs Fixed:
LPP-4719 'Provide a way to output relevant debug info to copy/paste into mail'

Technical Reviewer: ben (pending)
QA Reviewer: frisco (pending)
Doc Reviewer: jsundman (pending)

Documentation:
    The `bugReport` method of the Debugger can be used to create a
    report suitable for copy/pasting into a bug report.  To use it,
    enable backtraces and debugging, then inspect the error message
    that you believe reveals a bug, then invoke `Debug.bugReport()` in
    the debugger.  Copy and paste the output of that call into your
    bug report.

Details:
    LzDebug: Move environment from platform to here.  Add bugReport
    that outputs versionInfo, the backtrace from the last inspected
    error, and inspects all the `this` objects in the backtrace.

LzBacktrace: Add an interface to map over the frames of a backtrace.

    LaszloCanvas: Fix a type-oh in versionInfoString

Tests:
    Invoking Debug.bugReport after inspecting an assertion failure in
    smokecheck yields the following output:

    lzx> Debug.bugReport()
    Please copy the following information into your bug report.

    ---START OF BUG REPORT---
    LPS VERSION INFORMATION:
URL: http://dueling-banjos.local:8080/wafflecone/test/smoke/ simple.lzx?lzt=swf&debug=true&lzr=swf7&lzbacktrace=true
    Version: 4.0.x.0
    Release: Latest
    Build: 6422 /Users/ptw/OpenLaszlo/wafflecone
    Date: 2007-09-13T08:25:52-0400
    Target: swf7
    Runtime: 9.45

ERROR MESSAGE: ERROR @lzunit/lzunit.lzx#382: Expected: expected 'non-null value' got null

    ERROR BACKTRACE:
    LzError @lfc/debugger/LzMessage.lzs#439
this: «LzError#76| ERROR @lzunit/lzunit.lzx#382: Expected: expected 'non-null value' got null»
      arg  0: null
      arg  1: null
arg 2: «LzMessage(45)#217| "Expected: expected 'non-null value' got null"»
    format @lzunit/lzunit.lzx#382
      this: «lz.IntentionalFailures#222| IntentionalFailures»
      arg  0: 'Expected'
      arg  1: 'non-null value'
      arg  2: null
    assertNotNull @lzunit/lzunit.lzx#485
      this: «lz.IntentionalFailures#222| IntentionalFailures»
      arg  0: null
      arg  1: 'Expected'
    testFailures @lzunit-test.lzl#468
      this: «lz.IntentionalFailures#222| IntentionalFailures»
    runTest @lzunit/lzunit.lzx#668
      this: «lz.IntentionalFailures#222| IntentionalFailures»
      arg  0: 'testFailures'
    run @lzunit/lzunit.lzx#632
      this: «lz.IntentionalFailures#222| IntentionalFailures»
      arg  0: «TestResult#145| Tests: 448 Failures: 0 Errors: 0»
      arg  1: 'testFailures'
    runNextTest @lzunit/lzunit.lzx#1148
      this: «TestSuite#148| TestSuite»
      arg  0: 1806
    execute @lfc/events/LaszloEvents.lzs#95
      this: «LzDelegate#231| TestSuite.runNextTest()»
      arg  0: 1806
    removeCallIdleDelegates @lfc/services/LzIdle.lzs#67
      this: «LzIdleClass#154| LzIdle»
      arg  0: 1806
    sendEvent @lfc/events/LaszloEvents.lzs#437
      this: «LzEvent#157| LzIdle.onidle»
      arg  0: 1806
    __idleupdate @lfc/services/LzIdle.lzs#103
      this: «MovieClip#160| global»
      arg  0: 1806
    kernel/LzIdleKernel.lzs#29/16 @lfc/kernel/LzIdleKernel.lzs#32
      this: «undefined»

    OBJECT DETAILS:
    Object 157: «LzEvent#157| LzIdle.onidle» {
    _dbg_eventName: 'onidle'
_dbg_eventSender: <a href="asfunction:_root. $modules.lz.Debug.displayObj,154"><font color="#0000ff">LzIdle</ font></a> constructor: <a href="asfunction:_root. $modules.lz.Debug.displayObj,163"><font color="#0000ff">LzEvent</ font></a> delegateList: <a href="asfunction:_root. $modules.lz.Debug.displayObj,164"><font color="#0000ff">[]</font></a>
    locked: false
    ready: false
    }

    Object 154: «LzIdleClass#154| LzIdle» {
_events: <a href="asfunction:_root.$modules.lz.Debug.displayObj, 165"><font color="#0000ff">[LzEvent]</font></a> coi: <a href="asfunction:_root.$modules.lz.Debug.displayObj, 236"><font color="#0000ff">[]</font></a> constructor: <a href="asfunction:_root. $modules.lz.Debug.displayObj,167"><font color="#0000ff">LzIdleClass</ font></a> onidle: <a href="asfunction:_root.$modules.lz.Debug.displayObj, 157"><font color="#0000ff">LzIdle.onidle</font></a>
    regNext: false
removeCOI: <a href="asfunction:_root. $modules.lz.Debug.displayObj,168"><font color="#0000ff">LzIdle.removeCallIdleDelegates()</font></a>
    }

    Object 231: «LzDelegate#231| TestSuite.runNextTest()» {
c: <a href="asfunction:_root.$modules.lz.Debug.displayObj, 148"><font color="#0000ff">TestSuite</font></a> constructor: <a href="asfunction:_root. $modules.lz.Debug.displayObj,169"><font color="#0000ff">LzDelegate</ font></a>
     f: 'runNextTest'
    }

[...]

Object 76: «LzError#76| ERROR @lzunit/lzunit.lzx#382: Expected: expected 'non-null value' got null» { backtrace: <a href="asfunction:_root. $modules.lz.Debug.displayObj,216"><font color="#0000ff">LzError &lt;- format &lt;- assertNotNull &lt;- testFailures &lt;- runTest &lt;- run &lt;- ...</font></a>
    file: 'lzunit/lzunit.lzx'
    line: 382
message: <a href="asfunction:_root.$modules.lz.Debug.displayObj, 217"><font color="#0000ff">"Expected: expected 'non-null value' got null"</font></a>
    }

    ---END OF BUG REPORT---
    lzx>

Files:
M      WEB-INF/lps/lfc/debugger/LzDebug.lzs
M      WEB-INF/lps/lfc/debugger/platform/dhtml/kernel.js
M      WEB-INF/lps/lfc/debugger/LzBacktrace.lzs
M      WEB-INF/lps/lfc/views/LaszloCanvas.lzs


Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070913-ptw- P.tar

Reply via email to