[Pharo-project] Disable the debugger
Hi, is it possible to disable the debugger in a Seaside image for production ? Laurent Laffont - @lolgzs <http://twitter.com/#!/lolgzs> Pharo Smalltalk Screencasts: http://www.pharocasts.com/ Blog: http://magaloma.blogspot.com/ Developer group: http://cara74.seasidehosting.st
Check in older Pharo images like 1.1.1 all the stuff in #disableProgrammerFacilities disableProgrammerFacilities "Warning: do not call this lightly! It disables all access to menus, debuggers, halos. There is no guaranteed return from this, which is to say, you cannot necessarily reenable these things once they are disabled -- you can only use whatever the UI of the current project affords, and you cannot even snapshot -- you can only quit. You can completely reverse the work of this method by calling the dual Preferences method enableProgrammerFacilities, provided you have left yourself leeway to bring about a call to that method. (does not reverse the ToolSet registrations) To set up a system that will come up in such a state, you have to request the snapshot in the same breath as you disable the programmer facilities. To do this, put the following line into the 'do' menu and then evaluate it from that 'do' menu: Preferences disableProgrammerFacilities. You will be prompted for a new image name under which to save the resulting image." self deprecated: 'No replacement for now'. Beeper beep. (self confirm: 'CAUTION!! This is a drastic step! Do you really want to do this?') ifFalse: [Beeper beep. ^self inform: 'whew!']. self disable: #cmdDotEnabled. "No user-interrupt-into-debugger" self disable: #editableStringMorphs. "turn off shift-click editing" ToolSet registeredClasses copy do: [:c | ToolSet unregister: c]. ToolSet default: nil. "unregister and make sure default is nil to really prevent debug windows" "also now takes care of low space watcher interrupts" self compileHardCodedPref: #cmdGesturesEnabled enable: false. "No halos, etc." self compileHardCodedPref: #cmdKeysInText enable: false. "No user commands invokable via cmd-key combos in text editor" self enable: #noviceMode. "No control-menu" self disable: #warnIfNoSourcesFile. self disable: #warnIfNoChangesFile. Smalltalk saveAs On Tue, Aug 2, 2011 at 5:59 PM, laurent laffont <laurent.laffont@gmail.com>wrote:
Hi,
is it possible to disable the debugger in a Seaside image for production ?
Laurent Laffont - @lolgzs <http://twitter.com/#%21/lolgzs>
Pharo Smalltalk Screencasts: http://www.pharocasts.com/ Blog: http://magaloma.blogspot.com/ Developer group: http://cara74.seasidehosting.st
-- Mariano http://marianopeck.wordpress.com
ToolSet is deprecated in 1.4 (will be removed) Use Smalltalk tools instead. On 2 August 2011 19:06, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
Check in older Pharo images like 1.1.1 all the stuff in #disableProgrammerFacilities
disableProgrammerFacilities    "Warning: do not call this lightly! It disables all access to menus, debuggers, halos. There is no guaranteed return from this, which is to say, you cannot necessarily reenable these things once they are disabled -- you can only use whatever the UI of the current project affords, and you cannot even snapshot -- you can only quit.
    You can completely reverse the work of this method by calling the dual Preferences method enableProgrammerFacilities, provided you have left yourself leeway to bring about a call to that method. (does not reverse the ToolSet registrations)
   To set up a system that will come up in such a state, you have to request the snapshot in the same breath as you disable the programmer facilities. To do this, put the following line into the 'do' menu and then evaluate it from that 'do' menu:
        Preferences disableProgrammerFacilities.
You will be prompted for a new image name under which to save the resulting image." Â Â Â self deprecated: 'No replacement for now'.
   Beeper beep.    (self       confirm: 'CAUTION!! This is a drastic step! Do you really want to do this?')          ifFalse:             [Beeper beep.             ^self inform: 'whew!'].    self disable: #cmdDotEnabled.   "No user-interrupt-into-debugger"    self disable: #editableStringMorphs. "turn off shift-click editing"    ToolSet registeredClasses copy do: [:c | ToolSet unregister: c].    ToolSet default: nil. "unregister and make sure default is nil to really prevent debug windows"       "also now takes care of low space watcher interrupts"    self compileHardCodedPref: #cmdGesturesEnabled enable: false.   "No halos, etc."    self compileHardCodedPref: #cmdKeysInText enable: false.   "No user commands invokable via cmd-key combos in text editor"    self enable: #noviceMode.   "No control-menu"    self disable: #warnIfNoSourcesFile.    self disable: #warnIfNoChangesFile.    Smalltalk saveAs
On Tue, Aug 2, 2011 at 5:59 PM, laurent laffont <laurent.laffont@gmail.com> wrote:
Hi, is it possible to disable the debugger in a Seaside image for production ? Laurent Laffont -Â @lolgzs
Pharo Smalltalk Screencasts: http://www.pharocasts.com/ Blog: http://magaloma.blogspot.com/ Developer group: http://cara74.seasidehosting.st
-- Mariano http://marianopeck.wordpress.com
-- Best regards, Igor Stasenko AKA sig.
would be nice to have a class responsible for that and that slowly we get a complete system ready for this kind of deployement Stef On Aug 2, 2011, at 7:06 PM, Mariano Martinez Peck wrote:
Check in older Pharo images like 1.1.1 all the stuff in #disableProgrammerFacilities
disableProgrammerFacilities "Warning: do not call this lightly! It disables all access to menus, debuggers, halos. There is no guaranteed return from this, which is to say, you cannot necessarily reenable these things once they are disabled -- you can only use whatever the UI of the current project affords, and you cannot even snapshot -- you can only quit.
You can completely reverse the work of this method by calling the dual Preferences method enableProgrammerFacilities, provided you have left yourself leeway to bring about a call to that method. (does not reverse the ToolSet registrations)
To set up a system that will come up in such a state, you have to request the snapshot in the same breath as you disable the programmer facilities. To do this, put the following line into the 'do' menu and then evaluate it from that 'do' menu:
Preferences disableProgrammerFacilities.
You will be prompted for a new image name under which to save the resulting image." self deprecated: 'No replacement for now'.
Beeper beep. (self confirm: 'CAUTION!! This is a drastic step! Do you really want to do this?') ifFalse: [Beeper beep. ^self inform: 'whew!']. self disable: #cmdDotEnabled. "No user-interrupt-into-debugger" self disable: #editableStringMorphs. "turn off shift-click editing" ToolSet registeredClasses copy do: [:c | ToolSet unregister: c]. ToolSet default: nil. "unregister and make sure default is nil to really prevent debug windows" "also now takes care of low space watcher interrupts" self compileHardCodedPref: #cmdGesturesEnabled enable: false. "No halos, etc." self compileHardCodedPref: #cmdKeysInText enable: false. "No user commands invokable via cmd-key combos in text editor" self enable: #noviceMode. "No control-menu" self disable: #warnIfNoSourcesFile. self disable: #warnIfNoChangesFile. Smalltalk saveAs
On Tue, Aug 2, 2011 at 5:59 PM, laurent laffont <laurent.laffont@gmail.com> wrote: Hi,
is it possible to disable the debugger in a Seaside image for production ?
Laurent Laffont - @lolgzs
Pharo Smalltalk Screencasts: http://www.pharocasts.com/ Blog: http://magaloma.blogspot.com/ Developer group: http://cara74.seasidehosting.st
-- Mariano http://marianopeck.wordpress.com
On 2 August 2011 22:04, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
would be nice to have a class responsible for that and that slowly we get a complete system ready for this kind of deployement
I think best would be to adopt this with Pharo-Kernel , since it unloads a lot of stuff and knows how to do that w/o errors. Maybe adding option(s) there like "strip dev tools" would be nice.
Stef
On Aug 2, 2011, at 7:06 PM, Mariano Martinez Peck wrote:
Check in older Pharo images like 1.1.1 all the stuff in #disableProgrammerFacilities
disableProgrammerFacilities   "Warning: do not call this lightly!  It disables all access to menus, debuggers, halos.  There is no guaranteed return from this, which is to say, you cannot necessarily reenable these things once they are disabled -- you can only use whatever the UI of the current project affords, and you cannot even snapshot -- you can only quit.
   You can completely reverse the work of this method by calling the dual Preferences method enableProgrammerFacilities, provided you have left yourself leeway to bring about a call to that method. (does not reverse the ToolSet registrations)
  To set up a system that will come up in such a state, you have to request the snapshot in the same breath as you disable the programmer facilities.  To do this, put the following line into the 'do' menu and then evaluate it from that 'do' menu:
     Preferences disableProgrammerFacilities.
You will be prompted for a new image name under which to save the resulting image." Â Â self deprecated: 'No replacement for now'.
  Beeper beep.   (self     confirm: 'CAUTION!! This is a drastic step! Do you really want to do this?')       ifFalse:         [Beeper beep.         ^self inform: 'whew!'].   self disable: #cmdDotEnabled.   "No user-interrupt-into-debugger"   self disable: #editableStringMorphs. "turn off shift-click editing"   ToolSet registeredClasses copy do: [:c | ToolSet unregister: c].   ToolSet default: nil. "unregister and make sure default is nil to really prevent debug windows"     "also now takes care of low space watcher interrupts"   self compileHardCodedPref: #cmdGesturesEnabled enable: false.   "No halos, etc."   self compileHardCodedPref: #cmdKeysInText enable: false.   "No user commands invokable via cmd-key combos in text editor"   self enable: #noviceMode.   "No control-menu"   self disable: #warnIfNoSourcesFile.   self disable: #warnIfNoChangesFile.   Smalltalk saveAs
On Tue, Aug 2, 2011 at 5:59 PM, laurent laffont <laurent.laffont@gmail.com> wrote: Hi,
is it possible to disable the debugger in a Seaside image for production ?
Laurent Laffont - @lolgzs
Pharo Smalltalk Screencasts: http://www.pharocasts.com/ Blog: http://magaloma.blogspot.com/ Developer group: http://cara74.seasidehosting.st
-- Mariano http://marianopeck.wordpress.com
-- Best regards, Igor Stasenko AKA sig.
participants (4)
-
Igor Stasenko -
laurent laffont -
Mariano Martinez Peck -
Stéphane Ducasse