DebugView.st
changeset 2589 2342403139a7
parent 2581 6593d7ee2f3e
child 2591 613b7c72371c
equal deleted inserted replaced
2588:4d59125b5f59 2589:2342403139a7
  1253 
  1253 
  1254     "Modified: 29.8.1995 / 23:38:54 / claus"
  1254     "Modified: 29.8.1995 / 23:38:54 / claus"
  1255     "Modified: 4.3.1997 / 01:54:03 / cg"
  1255     "Modified: 4.3.1997 / 01:54:03 / cg"
  1256 ! !
  1256 ! !
  1257 
  1257 
  1258 !DebugView methodsFor:'initialize / release'!
  1258 !DebugView methodsFor:'initialization & release'!
  1259 
  1259 
  1260 addToCurrentProject
  1260 addToCurrentProject
  1261     "ignored here"
  1261     "ignored here"
  1262 
  1262 
  1263     ^ self
  1263     ^ self
  1879                         "/ is a block of the steppedContext, we must really
  1879                         "/ is a block of the steppedContext, we must really
  1880                         "/ do a single step. Otherwise, stepping through a
  1880                         "/ do a single step. Otherwise, stepping through a
  1881                         "/ do:-loop would be very difficult.
  1881                         "/ do:-loop would be very difficult.
  1882 
  1882 
  1883                         (where receiver isBlock
  1883                         (where receiver isBlock
  1884                         and:[where receiver home == steppedContext])
  1884                         and:[(where receiver isKindOf:Block)
       
  1885                         and:[where receiver home == steppedContext]])
  1885                         ifTrue:[
  1886                         ifTrue:[
  1886                             anyStepBlocks := true.
  1887                             anyStepBlocks := true.
  1887                         ] ifFalse:[
  1888                         ] ifFalse:[
  1888                             where args do:[:arg |
  1889                             where args do:[:arg |
  1889                                 (arg isBlock
  1890                                 (arg isBlock
  1890                                 and:[arg home == steppedContext])
  1891                                 and:[(arg isKindOf:Block)
       
  1892                                 and:[arg home == steppedContext]])
  1891                                 ifTrue:[
  1893                                 ifTrue:[
  1892                                     anyStepBlocks := true.
  1894                                     anyStepBlocks := true.
  1893                                 ]
  1895                                 ]
  1894                             ]
  1896                             ]
  1895                         ].
  1897                         ].
  2166         self enter:con select:initiallyShown
  2168         self enter:con select:initiallyShown
  2167     ].
  2169     ].
  2168     con := nil
  2170     con := nil
  2169 
  2171 
  2170     "Created: / 14.10.1996 / 12:53:39 / cg"
  2172     "Created: / 14.10.1996 / 12:53:39 / cg"
  2171     "Modified: / 6.9.1998 / 21:42:28 / cg"
  2173     "Modified: / 4.2.2000 / 20:21:11 / cg"
  2172 ! !
  2174 ! !
  2173 
  2175 
  2174 !DebugView methodsFor:'menu / button actions'!
  2176 !DebugView methodsFor:'menu / button actions'!
  2175 
  2177 
  2176 autoUpdateOff
  2178 autoUpdateOff
  2287 !
  2289 !
  2288 
  2290 
  2289 browseImplementorsOf
  2291 browseImplementorsOf
  2290     "open a browser on the implementors of some selector"
  2292     "open a browser on the implementors of some selector"
  2291 
  2293 
  2292     |initial selector|
  2294     |initial selector sel|
  2293 
  2295 
  2294     initial := codeView selection 
  2296     (sel := codeView selection) notNil ifTrue:[
  2295                   ifNil:[selectedContext isNil 
  2297         initial := BrowserView extractSelectorFrom:sel
       
  2298     ].
       
  2299     initial isNil ifTrue:[
       
  2300         initial := selectedContext isNil 
  2296                             ifTrue:[nil]
  2301                             ifTrue:[nil]
  2297                             ifFalse:[selectedContext selector]].
  2302                             ifFalse:[selectedContext selector].
       
  2303     ].
  2298     selector := Dialog 
  2304     selector := Dialog 
  2299                     request:'Selector to browse implementors of:'
  2305                     request:'Selector to browse implementors of:'
  2300                     initialAnswer:initial.
  2306                     initialAnswer:initial.
  2301     selector size == 0 ifFalse:[
  2307     selector size == 0 ifFalse:[
  2302         SystemBrowser browseImplementorsOf:selector asSymbol.
  2308         SystemBrowser browseImplementorsOf:selector asSymbol.
  2303     ]
  2309     ]
       
  2310 
       
  2311     "Modified: / 6.2.2000 / 01:05:14 / cg"
  2304 !
  2312 !
  2305 
  2313 
  2306 browseSenders
  2314 browseSenders
  2307     "open a browser on the senders of the selected methods selector"
  2315     "open a browser on the senders of the selected methods selector"
  2308 
  2316 
  2313 !
  2321 !
  2314 
  2322 
  2315 browseSendersOf
  2323 browseSendersOf
  2316     "open a browser on the senders of some selector"
  2324     "open a browser on the senders of some selector"
  2317 
  2325 
  2318     |initial selector|
  2326     |initial selector sel|
  2319 
  2327 
  2320     initial := codeView selection 
  2328     (sel := codeView selection) notNil ifTrue:[
  2321                   ifNil:[selectedContext isNil 
  2329         initial := BrowserView extractSelectorFrom:sel
       
  2330     ].
       
  2331     initial isNil ifTrue:[
       
  2332         initial := selectedContext isNil 
  2322                             ifTrue:[nil]
  2333                             ifTrue:[nil]
  2323                             ifFalse:[selectedContext selector]].
  2334                             ifFalse:[selectedContext selector].
       
  2335     ].
  2324     selector := Dialog 
  2336     selector := Dialog 
  2325                     request:'Selector to browse senders of:'
  2337                     request:'Selector to browse senders of:'
  2326                     initialAnswer:initial.
  2338                     initialAnswer:initial.
  2327     selector size == 0 ifFalse:[
  2339     selector size == 0 ifFalse:[
  2328         SystemBrowser browseAllCallsOn:selector asSymbol.
  2340         SystemBrowser browseAllCallsOn:selector asSymbol.
  2329     ]
  2341     ]
       
  2342 
       
  2343     "Modified: / 6.2.2000 / 01:05:29 / cg"
  2330 !
  2344 !
  2331 
  2345 
  2332 copyWalkbackText
  2346 copyWalkbackText
  2333     "place the contents of the walkback view into the copy-paste buffer.
  2347     "place the contents of the walkback view into the copy-paste buffer.
  2334      This allows pasting it into some other view for printing ..."
  2348      This allows pasting it into some other view for printing ..."
  3616          simply enter the DebugViews-Windowgroup event loop.
  3630          simply enter the DebugViews-Windowgroup event loop.
  3617          effectively suspending event processing for the currently 
  3631          effectively suspending event processing for the currently 
  3618          active group.
  3632          active group.
  3619         "
  3633         "
  3620         SignalSet anySignal handle:[:ex |
  3634         SignalSet anySignal handle:[:ex |
  3621             |answer signal|
  3635             |answer signal eMsg|
  3622 
  3636 
  3623             signal := ex signal.
  3637             signal := ex signal.
  3624 
  3638 
  3625             DebuggingDebugger ~~ true ifTrue:[
  3639             DebuggingDebugger ~~ true ifTrue:[
  3626                 "/
  3640                 "/
  3681                 ].
  3695                 ].
  3682             ].
  3696             ].
  3683 
  3697 
  3684             self topView raiseDeiconified.    
  3698             self topView raiseDeiconified.    
  3685 
  3699 
       
  3700             eMsg := ex errorString.
       
  3701             (ex signal == MessageTracer breakpointSignal
       
  3702             or:[ex signal == Object haltSignal]) ifTrue:[
       
  3703                 eMsg := eMsg , Character cr asString , 'in ' , ex suspendedContext printString
       
  3704             ].
       
  3705 
  3686             answer := Dialog 
  3706             answer := Dialog 
  3687                         choose:('error in debugger:\' withCRs , ex errorString , '\\debug again ?' withCRs) 
  3707                         choose:('error in debugger:\' withCRs , eMsg , '\\debug again ?' withCRs) 
  3688                         labels:#( 'proceed' 'cancel' 'debug' ) 
  3708                         labels:#( 'proceed' 'cancel' 'debug' ) 
  3689                         values:#( #proceed #cancel #debug ) 
  3709                         values:#( #proceed #cancel #debug ) 
  3690                         default:#cancel.
  3710                         default:#cancel.
  3691             answer == #debug ifTrue:[
  3711             answer == #debug ifTrue:[
  3692                 'DebugView [info]: cought exception - debugging' infoPrintCR.
  3712                 'DebugView [info]: cought exception - debugging' infoPrintCR.
  3693                 Debugger 
  3713                 Debugger 
  3694                     enterUnconditional:(ex suspendedContext) 
  3714                     enterUnconditional:(ex suspendedContext) 
  3695                     withMessage:'error in debugger: ' , ex errorString
  3715                     withMessage:'error in debugger: ' , eMsg
  3696                     mayProceed:true.
  3716                     mayProceed:true.
  3697                 ex proceed.
  3717                 ex proceed.
  3698             ].
  3718             ].
  3699             answer == #proceed ifTrue:[
  3719             answer == #proceed ifTrue:[
  3700                 'DebugView [info]: ignored exception - proceeding' infoPrintCR.
  3720                 'DebugView [info]: ignored exception - proceeding' infoPrintCR.
  3713         ].
  3733         ].
  3714     ].
  3734     ].
  3715     catchBlock := nil.
  3735     catchBlock := nil.
  3716 
  3736 
  3717     "Created: / 24.11.1995 / 20:33:45 / cg"
  3737     "Created: / 24.11.1995 / 20:33:45 / cg"
  3718     "Modified: / 31.5.1999 / 15:19:45 / cg"
  3738     "Modified: / 6.2.2000 / 15:14:07 / cg"
  3719 ! !
  3739 ! !
  3720 
  3740 
  3721 !DebugView methodsFor:'user interaction'!
  3741 !DebugView methodsFor:'user interaction'!
  3722 
  3742 
  3723 checkSelectionChangeAllowed
  3743 checkSelectionChangeAllowed
  4237 ! !
  4257 ! !
  4238 
  4258 
  4239 !DebugView class methodsFor:'documentation'!
  4259 !DebugView class methodsFor:'documentation'!
  4240 
  4260 
  4241 version
  4261 version
  4242     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.258 2000-02-02 22:36:18 cg Exp $'
  4262     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.259 2000-02-07 11:43:32 cg Exp $'
  4243 ! !
  4263 ! !
  4244 DebugView initialize!
  4264 DebugView initialize!