How to close all open debugger windows

First, we identify the windows that contain a debugger. We do this by finding the spaces that have a GtMoldableDebugger BlElement << #GtMoldableDebugger traits: {TGtPhlowToolDetailAdjustable}; slots: { #debuggerElement . #debuggerContainer . #buttonsContainer . #isSwitchingEnabled }; sharedVariables: { #AlwaysOpenFullDebugger . #ErrorRecursion . #LogDebuggerStackToFile . #LogFileName }; tag: 'Elements'; package: 'GToolkit-Debugger' somewhere in their rendering tree:

debuggerSpaces := BlSpace allInstances
		select: [ :each | (each root query // GtMoldableDebugger) isNotEmpty ].
  

Once we have those spaces, we can simply close them:

debuggerSpaces do: [ :each | each close ]