[lively-kernel] Debugger now available in all worlds

Milan Zimmermann milan.zimmermann at gmail.com
Mon Feb 13 05:59:43 CET 2012


sorry I keep replying to myself. There is something else going on,
maybe my debug test page is bad somehow ...  after I reloaded the page
- In the context of the OE it seems sometimes debugger does not come
up.

So perhaps the simpler test is this: I pasted in the Workspace :

// Just Ctrl-D on the code BELOW will make Ellipse
// Shift-Ctrl-D will show debugger, step by step will make the morph
undefined at line 3
var bounds = new Rectangle(0,0,200,100)
var morph = new lively.morphic.Morph(new lively.morphic.Shapes.Ellipse(bounds))
morph.setFill(Color.yellow)
morph.openInWorld();

and the above seems to duplicate it - it is also here:

http://lively-kernel.org/repository/webwerkstatt/users/mzimmerm/debug-fails.xhtml

Thanks
milan

On Sun, Feb 12, 2012 at 10:42 PM, Milan Zimmermann
<milan.zimmermann at gmail.com> wrote:
> Christopher:
>
> This is great. I played with debugging in the Workspace and it worked great.
>
> Inside an Object Editor I think there is something that is not quite
> right: I created an Rectangle that should make an Ellipse inside it's
> script:
>
> // changed at Sun Feb 12 2012 22:31:23 GMT-0600 (CST) by undefined
> this.addScript(function makeEllipses(event) {
>    alert('should debug')
>    debugger
>    var bounds = new Rectangle(0,0,200,100)
>    var morph = new lively.morphic.Morph(new
> lively.morphic.Shapes.Ellipse(bounds));
>    morph.setFill(Color.yellow)
>    morph.openInWorld();
>    }).tag([]);
>
> If I comment out the  debugger statement, an ellipse is made. With the
> debugger, if I click "Run" on the script, go to the debugger step by
> step, after
>
> var morph = new lively.morphic.Morph(new lively.morphic.Shapes.Ellipse(bounds));
>
> the morph var is undefined.
>
> It can be checked here:
>
> http://lively-kernel.org/repository/webwerkstatt/users/mzimmerm/Tests/test-lively-debugger.xhtml
>
> Thanks for giving us a way to debug!
>
> milan
>
>
> On Sun, Feb 12, 2012 at 6:38 PM, Christopher Schuster
> <cschuster at ucdavis.edu> wrote:
>> Hi,
>>
>> There is still a long way to go, but everyone interested in debugging Lively
>> can now use the built-in cross-browser debugger in three different ways:
>>
>> 1. Ctrl+Shift+D / Cmd+Shift+D
>>   keyboard shortcut to debug the selected code fragment
>>
>> 2. World Menu > Debugging > Debug Morphic Scripts
>>   enables setting breakpoints in the object editor
>>   with "debugger" statements
>>
>> 3. World Menu -> Debugging -> Prepare system for tracing/debugging +
>>   World Menu -> Debugging -> Start global debugging
>>   uses method instrumentation to maintain stack information
>>   with a slight performance overhead
>>
>> If any of these three methods is used, unhandled exceptions will open a
>> debugger window instead of showing a red box.
>>
>> Any feedback regarding bugs and feature requests is appreciated.
>>
>> Happy debugging,
>> Christopher
>>
>> PS: Integration with the test runner is on the way and coming soon.
>> _______________________________________________
>> lively-kernel mailing list
>> lively-kernel at hpi.uni-potsdam.de
>> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel


More information about the lively-kernel mailing list