[Seaside] Debugger not highlighting the right code
Derek Brans
seaside@lists.squeakfoundation.org
Tue, 03 Dec 2002 10:54:19 -0800
Here is the method that returns the current selection in the debugger.
It's a bit over my head at the moment. It's also very difficult to
debug cause it's in the debugger.
Any insights would be appreciated. -- Derek
pcRange
"Answer the indices in the source code for the method corresponding to
the selected context's program counter value."
| i methodNode pc end |
(selectingPC and: [contextStackIndex ~= 0])
ifFalse: [^1 to: 0].
sourceMap == nil ifTrue:
[methodNode _ self selectedClass compilerClass new
parse: contents in: self selectedClass
notifying: nil dialect: true.
sourceMap _ methodNode sourceMap.
tempNames _ methodNode tempNames.
self selectedContext method cacheTempNames: tempNames].
sourceMap size = 0 ifTrue: [^1 to: 0].
pc_ self selectedContext pc -
(("externalInterrupt" true and: [contextStackIndex=1])
ifTrue: [1]
ifFalse: [2]).
i _ sourceMap indexForInserting: (Association key: pc value: nil).
i < 1 ifTrue: [^1 to: 0].
i > sourceMap size
ifTrue:
[end _ sourceMap inject: 0 into:
[:prev :this | prev max: this value last].
^ end+1 to: end].
^(sourceMap at: i) value
On Monday, December 2, 2002, at 11:32 PM, Avi Bryant wrote:
>
> On Mon, 2 Dec 2002, Derek Brans wrote:
>
>> My Debugger is behaving weird when debugging seaside applications.
>> Both
>> browser debugger and regular debugger are highlighting the wrong
>> section
>> of code.
>
> I haven't noticed this, but it doesn't entirely surprise me - Seaside
> modifies the way instance variable references are compiled within
> Component methods, and it's quite likely that this is confusing the
> debugger (for more or less the same reason, all the inst vars will show
> up
> as nil).
>
> Try switching the source view in the debugger to pretty print
> - it won't be "pretty", exactly, but it may be more accurate.
>
> _______________________________________________
> Seaside mailing list
> Seaside@lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>
>
Nerd on a Wire: Web and Information Solutions
Website Design - Database Systems - Site Hosting
604.874.6463
mailto:info@nerdonawire.com
For more information, visit http://nerdonawire.com