moldable debugger challenge - iterator position

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

moldable debugger challenge - iterator position

Ben Coman
A bit of a pie in the sky idea, but....
I am currently tracing through code like this...

    XMLDOMVisitor >> visitDocument: theDocument
          theDocument nodes do: [ :each | each accept: self ]

and its hard to get a feel for where "each" is in theDocument.  I
wonder if it would even be possible for the debugger to have a tab
that showed a list of  "theDocument nodes" with a cursor positioned at
"each" ?    Maybe the #do: iterator is automatically identified, or
maybe you'd need a pragma to define the tab, specifying the list
contents and which variable is the cursor.  When the program crashes
on an item, you could selected an item a few earlier and choose to
break on that data value.

So I guess all of it would be tough, but anyway thought I'd share that
flash of an idea.
cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: moldable debugger challenge - iterator position

Andrei Chis
Hi Ben,

This seems like a nice idea. I think a first version of a debugger that does 
at least partially what you want is doable. Do you want to give it a try?
I can create a basic skeleton of the debugger and then we can iterate.

Cheers,
Andrei

On Sun, Jun 5, 2016 at 2:15 PM, Ben Coman <[hidden email]> wrote:
A bit of a pie in the sky idea, but....
I am currently tracing through code like this...

    XMLDOMVisitor >> visitDocument: theDocument
          theDocument nodes do: [ :each | each accept: self ]

and its hard to get a feel for where "each" is in theDocument.  I
wonder if it would even be possible for the debugger to have a tab
that showed a list of  "theDocument nodes" with a cursor positioned at
"each" ?    Maybe the #do: iterator is automatically identified, or
maybe you'd need a pragma to define the tab, specifying the list
contents and which variable is the cursor.  When the program crashes
on an item, you could selected an item a few earlier and choose to
break on that data value.

So I guess all of it would be tough, but anyway thought I'd share that
flash of an idea.
cheers -ben


Reply | Threaded
Open this post in threaded view
|

Re: moldable debugger challenge - iterator position

Ben Coman
Cool. Thanks Andrei.  Let me know how I can help.
cheers -ben

On Mon, Jun 6, 2016 at 6:14 AM, Andrei Chis <[hidden email]> wrote:

> Hi Ben,
>
> This seems like a nice idea. I think a first version of a debugger that does
> at least partially what you want is doable. Do you want to give it a try?
> I can create a basic skeleton of the debugger and then we can iterate.
>
> Cheers,
> Andrei
>
> On Sun, Jun 5, 2016 at 2:15 PM, Ben Coman <[hidden email]> wrote:
>>
>> A bit of a pie in the sky idea, but....
>> I am currently tracing through code like this...
>>
>>     XMLDOMVisitor >> visitDocument: theDocument
>>           theDocument nodes do: [ :each | each accept: self ]
>>
>> and its hard to get a feel for where "each" is in theDocument.  I
>> wonder if it would even be possible for the debugger to have a tab
>> that showed a list of  "theDocument nodes" with a cursor positioned at
>> "each" ?    Maybe the #do: iterator is automatically identified, or
>> maybe you'd need a pragma to define the tab, specifying the list
>> contents and which variable is the cursor.  When the program crashes
>> on an item, you could selected an item a few earlier and choose to
>> break on that data value.
>>
>> So I guess all of it would be tough, but anyway thought I'd share that
>> flash of an idea.
>> cheers -ben
>>
>