DebugView.st
changeset 3431 19dbcd369dbf
parent 3429 1832276b7443
child 3432 087493c18c74
equal deleted inserted replaced
3430:028c550c1798 3431:19dbcd369dbf
  4310 
  4310 
  4311             DebuggingDebugger ~~ true ifTrue:[
  4311             DebuggingDebugger ~~ true ifTrue:[
  4312                 "/
  4312                 "/
  4313                 "/ ignore recursive breakpoints
  4313                 "/ ignore recursive breakpoints
  4314                 "/
  4314                 "/
  4315                 (MessageTracer notNil
       
  4316                 and:[MessageTracer isLoaded
       
  4317                 and:[signal == MessageTracer breakpointSignal]]) ifTrue:[
       
  4318                     ignoreBreakpoints == true ifTrue:[
       
  4319                         'DebugView [info]: breakpoint in debugger ignored' infoPrintCR.
       
  4320                         ex proceed
       
  4321                     ].
       
  4322                 ].
       
  4323                 (signal == ActivityNotificationSignal) ifTrue:[
  4315                 (signal == ActivityNotificationSignal) ifTrue:[
  4324                     ex proceed
  4316                     ex proceed
  4325                 ].
  4317                 ].
  4326                 (signal == Object haltSignal) ifTrue:[
  4318                 (signal isControlInterrupt) ifTrue:[
  4327                     ignoreBreakpoints == true ifTrue:[
  4319                     ignoreBreakpoints == true ifTrue:[
  4328                         'DebugView [info]: halt in debugger ignored' infoPrintCR.
  4320                         'DebugView [info]: halt/break in debugger ignored' infoPrintCR.
  4329                         ex proceed
  4321                         ex proceed
  4330                     ].
  4322                     ].
  4331                 ].
  4323                 ].
  4332                 (signal == Process terminateSignal) ifTrue:[
  4324                 (signal == Process terminateSignal) ifTrue:[
  4333                     "/ mhm - someone wants to shoot me down while debugging ...
  4325                     "/ mhm - someone wants to shoot me down while debugging ...
  4368             ].
  4360             ].
  4369 
  4361 
  4370             self topView raiseDeiconified.    
  4362             self topView raiseDeiconified.    
  4371 
  4363 
  4372             eMsg := ex errorString.
  4364             eMsg := ex errorString.
  4373             (ex signal == MessageTracer breakpointSignal
  4365             (ex signal isControlInterrupt) ifTrue:[
  4374             or:[ex signal == Object haltSignal]) ifTrue:[
       
  4375                 eMsg := eMsg , Character cr asString , 'in ' , ex suspendedContext printString
  4366                 eMsg := eMsg , Character cr asString , 'in ' , ex suspendedContext printString
  4376             ].
  4367             ].
  4377 
  4368 
  4378             answer := Dialog 
  4369             answer := Dialog 
  4379                         choose:('error in debugger:\' withCRs , eMsg , '\\debug again ?' withCRs) 
  4370                         choose:('error in debugger:\' withCRs , eMsg , '\\debug again ?' withCRs) 
  4405         ].
  4396         ].
  4406     ].
  4397     ].
  4407     catchBlock := nil.
  4398     catchBlock := nil.
  4408 
  4399 
  4409     "Created: / 24.11.1995 / 20:33:45 / cg"
  4400     "Created: / 24.11.1995 / 20:33:45 / cg"
  4410     "Modified: / 6.2.2000 / 15:14:07 / cg"
  4401     "Modified: / 16.11.2001 / 16:14:44 / cg"
  4411 ! !
  4402 ! !
  4412 
  4403 
  4413 !DebugView methodsFor:'user interaction'!
  4404 !DebugView methodsFor:'user interaction'!
  4414 
  4405 
  4415 checkIfCodeIsReallyModified
  4406 checkIfCodeIsReallyModified
  4690      Also sent to autoselect an interesting context on entry."
  4681      Also sent to autoselect an interesting context on entry."
  4691 
  4682 
  4692     Object errorSignal handle:[:ex |
  4683     Object errorSignal handle:[:ex |
  4693         |s con|
  4684         |s con|
  4694 
  4685 
  4695         ex signal == Object haltSignal ifTrue:[
  4686         ex signal isControlInterrupt ifTrue:[
  4696             'DebugView [info]: halt ignored - while showing selection in debugger' infoPrintCR.
  4687             'DebugView [info]: halt/break ignored - while showing selection in debugger' infoPrintCR.
  4697             ex proceed
  4688             ex proceed
  4698         ].
  4689         ].
  4699 
  4690 
  4700         'DebugView [info]: error when showing selection in debugger ignored' infoPrintCR.
  4691         'DebugView [info]: error when showing selection in debugger ignored' infoPrintCR.
  4701 
  4692 
  4719         ex return.
  4710         ex return.
  4720     ] do:[
  4711     ] do:[
  4721         self doShowSelection:lineNr
  4712         self doShowSelection:lineNr
  4722     ]
  4713     ]
  4723 
  4714 
  4724     "Modified: / 11.8.1998 / 20:56:45 / cg"
  4715     "Modified: / 16.11.2001 / 16:13:08 / cg"
  4725 !
  4716 !
  4726 
  4717 
  4727 updateForContext:lineNr
  4718 updateForContext:lineNr
  4728     "show selected code for lineNr in contextList in textView.
  4719     "show selected code for lineNr in contextList in textView.
  4729      Also used to autoselect an interesting context on entry."
  4720      Also used to autoselect an interesting context on entry."
  4731     |con homeContext sel method code canAccept
  4722     |con homeContext sel method code canAccept
  4732      implementorClass lineNrInMethod rec m line
  4723      implementorClass lineNrInMethod rec m line
  4733      sender selSender tryVars possibleBlocks errMsg 
  4724      sender selSender tryVars possibleBlocks errMsg 
  4734      codeSet highlighter evaluatorClass
  4725      codeSet highlighter evaluatorClass
  4735      canDefine|
  4726      canDefine|
  4736 
       
  4737 lineNr > contextArray size ifTrue:[ thisContext fullPrintAll ].
       
  4738 
  4727 
  4739     canDefine := false.
  4728     canDefine := false.
  4740     currentMethod := nil.
  4729     currentMethod := nil.
  4741 
  4730 
  4742     contextArray notNil ifTrue:[
  4731     contextArray notNil ifTrue:[
  4911 
  4900 
  4912             code isNil ifTrue:[
  4901             code isNil ifTrue:[
  4913                 errMsg := nil.
  4902                 errMsg := nil.
  4914                 method notNil ifTrue:[
  4903                 method notNil ifTrue:[
  4915                     Object errorSignal handle:[:ex |
  4904                     Object errorSignal handle:[:ex |
  4916                         ex signal == Object haltSignal ifTrue:[
  4905                         ex signal isControlInterrupt ifTrue:[
  4917                             ex proceed.
       
  4918                         ].
       
  4919                         ex signal == MessageTracer breakpointSignal ifTrue:[
       
  4920                             ex proceed.
  4906                             ex proceed.
  4921                         ].
  4907                         ].
  4922                         code := 'error while asking method for its source'.
  4908                         code := 'error while asking method for its source'.
  4923                         code := code , Character cr , ex signal printString.
  4909                         code := code , Character cr , ex signal printString.
  4924                         code := code , Character cr , 'in: ' , ex suspendedContext printString.
  4910                         code := code , Character cr , 'in: ' , ex suspendedContext printString.
  5073      enable/disable some menu items
  5059      enable/disable some menu items
  5074     "
  5060     "
  5075     self updateMenuItems
  5061     self updateMenuItems
  5076 
  5062 
  5077     "Created: / 14.8.1997 / 20:15:00 / cg"
  5063     "Created: / 14.8.1997 / 20:15:00 / cg"
  5078     "Modified: / 16.11.2001 / 15:54:49 / cg"
  5064     "Modified: / 16.11.2001 / 16:16:23 / cg"
  5079 !
  5065 !
  5080 
  5066 
  5081 updateMenuItems
  5067 updateMenuItems
  5082     |m mthd cls mCls rCls|
  5068     |m mthd cls mCls rCls|
  5083 
  5069 
  5124 ! !
  5110 ! !
  5125 
  5111 
  5126 !DebugView class methodsFor:'documentation'!
  5112 !DebugView class methodsFor:'documentation'!
  5127 
  5113 
  5128 version
  5114 version
  5129     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.294 2001-11-16 15:12:10 cg Exp $'
  5115     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.295 2001-11-16 15:19:52 cg Exp $'
  5130 ! !
  5116 ! !
  5131 DebugView initialize!
  5117 DebugView initialize!