[squeak-dev] The Trunk: Tools-mt.1185.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jan 20 14:49:17 UTC 2023


Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.1185.mcz

==================== Summary ====================

Name: Tools-mt.1185
Author: mt
Time: 20 January 2023, 3:49:16.090382 pm
UUID: 094aa194-809e-394a-9cdd-33097af84d33
Ancestors: Tools-mt.1184

Complements System-mt.1384

=============== Diff against Tools-mt.1184 ===============

Item was changed:
  ----- Method: Debugger class>>openOn:context:label:contents:fullView: (in category 'opening') -----
+ openOn: process context: context label: title contents: contentsStringOrNil fullView: bool
+ 	"PRIVATE!! Open a notifier or a full debugger window for the given process
+ 	at the given context. Clients MUST use a ToolSet that is configured with the
+ 	receiver class (or tool) to then debug a process via
+ 		Process >> #debug(WithTitle:)
+ 		ProcessorScheduler >> #debugWithTitle:
+ 		ToolSet >> #debugProcess:context:...
+ 	and similar messages in Process or ProcessorScheduler.
- openOn: process context: context label: titleOrNil contents: contentsStringOrNil fullView: bool
- 	"Open a notifier or a full debugger window for the given process at the given context. Decorates that invocation with (1) recursive-error detection and (2) error logging, which are both independent from the active GUI framework, that is, MVC or Morphic.
  	
+ 	Example invocations:
+ 		Processor debugWithTitle: 'Example'.
+ 		(Process forBlock: [3+4]) debug.
+ 		7/0.
- 	Note that clients should debug processes through Process >> #debug or ToolSet instead of calling this method directly."
- 
- 	| activeProcess title |
- 	activeProcess := Processor activeProcess.
- 	title := titleOrNil ifNil: ['Debugger' translated].
  	
+ 	Configure a new tool set like this
+ 		ToolSet default: StandardToolSet
+ 	See commentary in
+ 		Process >> #debugWithTitle:full:contents:
+ 		ProcessorScheduler >> #debugContext:title:full:contents:"
- 	"If the active process re-enters this method again, something went wrong with invoking the debugger."
- 	activeProcess hasRecursiveError ifTrue: [
- 		activeProcess clearErrorRecursionFlag.
- 		^ ToolSet handleRecursiveError: title].
- 	
- 	"Explicitely handle logging exceptions. No need to bother the recursion mechanism here."
- 	[Preferences logDebuggerStackToFile
- 		ifTrue: [Smalltalk logSqueakError: title inContext: context]
- 	] on: Error do: [:ex |
- 		Preferences disable: #logDebuggerStackToFile.
- 		ToolSet debugException: ex].
  
+ 	^ (self onProcess: process context: context)
+ 		openWithLabel: title
+ 		contents: contentsStringOrNil
+ 		fullView: bool;
+ 		yourself!
- 	"If project-specific debuggers mess up, we have to flag that recursion here. See above."
- 	[activeProcess setErrorRecursionFlag.
- 		^ (self onProcess: process context: context)
- 			openWithLabel: title contents: contentsStringOrNil fullView: bool;
- 			yourself
- 	] ensure: [activeProcess clearErrorRecursionFlag].!



More information about the Squeak-dev mailing list