Zope/ResourceRegistries debug modes in Plone 4

classic Classic list List threaded Threaded
7 messages Options
Eric Steele (esteele) Eric Steele (esteele)
Reply | Threaded
Open this post in threaded view
|

Zope/ResourceRegistries debug modes in Plone 4


Plone 4 (and trunk) uses Zope's debug mode on/off to toggle the debug  
mode status of the ResourceRegistries (portal_css, portal_javascripts,  
portal_kss). I absolutely love this change because it saves me a lot  
of repetitive clicks while developing and debugging. That said, this  
evening as I tried to turn off portal_css' debug mode, I realized  
that I'd need to change the "debug-mode" value in buildout.cfg and  
rerun my buildout to flip that switch again.

Since users tend to be, well... absolutely terrified to run bin/
buildout, is there another way to solve this? Or am I missing  
something about the way this was intended to work?

Eric

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Martin Aspeli Martin Aspeli
Reply | Threaded
Open this post in threaded view
|

Re: Zope/ResourceRegistries debug modes in Plone 4

Eric Steele wrote:

> Plone 4 (and trunk) uses Zope's debug mode on/off to toggle the debug  
> mode status of the ResourceRegistries (portal_css, portal_javascripts,  
> portal_kss). I absolutely love this change because it saves me a lot  
> of repetitive clicks while developing and debugging. That said, this  
> evening as I tried to turn off portal_css' debug mode, I realized  
> that I'd need to change the "debug-mode" value in buildout.cfg and  
> rerun my buildout to flip that switch again.
>
> Since users tend to be, well... absolutely terrified to run bin/
> buildout, is there another way to solve this? Or am I missing  
> something about the way this was intended to work?

If you run in foreground mode, you also run in debug mode, no?

  bin/instance fg

Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Hanno Schlichting-4 Hanno Schlichting-4
Reply | Threaded
Open this post in threaded view
|

Re: Zope/ResourceRegistries debug modes in Plone 4

On Tue, Sep 29, 2009 at 11:43 AM, Martin Aspeli
<[hidden email]> wrote:
> Eric Steele wrote:
>> Since users tend to be, well... absolutely terrified to run bin/
>> buildout, is there another way to solve this? Or am I missing
>> something about the way this was intended to work?

Actually I tried to come up with some way to disable css/js debug mode
while the global zope development was still on. I just gave up on it,
as I couldn't make the UI for that work in an easy way.

Thinking about it again, instead of a simple checkbox you'd probably have to do:

Debug mode:

(x) - Determined globally (currently turned <on|off>)
( ) - Enable debug mode
( ) - Disable debug mode

If you explicitly set a persistent setting, then you always get it,
otherwise you can just use the global mode. The UI would need to tell
you what the global setting currently is.

Anyone who feels like wielding some ZMI screen magic?

Hanno

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
AnthonyG AnthonyG
Reply | Threaded
Open this post in threaded view
|

Re: Zope/ResourceRegistries debug modes in Plone 4

I think this is quite important (at least for me).  If you run with CSS debug switched on then testing through the web is a lot slower.  Having the option to run Zope in debug mode but not have CSS on debug is a good thing.  I develop on windows and only ever run zope in foreground mode when developing.

Anthony

Hanno Schlichting wrote:

> On Tue, Sep 29, 2009 at 11:43 AM, Martin Aspeli
> <[hidden email]> wrote:
>> Eric Steele wrote:
>>> Since users tend to be, well... absolutely terrified to run bin/
>>> buildout, is there another way to solve this? Or am I missing
>>> something about the way this was intended to work?
>
> Actually I tried to come up with some way to disable css/js debug mode
> while the global zope development was still on. I just gave up on it,
> as I couldn't make the UI for that work in an easy way.
>
> Thinking about it again, instead of a simple checkbox you'd probably have to do:
>
> Debug mode:
>
> (x) - Determined globally (currently turned <on|off>)
> ( ) - Enable debug mode
> ( ) - Disable debug mode
>
> If you explicitly set a persistent setting, then you always get it,
> otherwise you can just use the global mode. The UI would need to tell
> you what the global setting currently is.
>
> Anyone who feels like wielding some ZMI screen magic?
>
> Hanno
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Plone-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/plone-developers
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Hanno Schlichting-4 Hanno Schlichting-4
Reply | Threaded
Open this post in threaded view
|

Re: Zope/ResourceRegistries debug modes in Plone 4

On Tue, Sep 29, 2009 at 4:33 PM, Anthony Gerrard
<[hidden email]> wrote:
> I think this is quite important (at least for me).  If you run with CSS debug switched on then testing through the web is a lot slower.  Having the option to run Zope in debug mode but not have CSS on debug is a good thing.  I develop on windows and only ever run zope in foreground mode when developing.

Hhm. Testing TTW isn't noticeably slower for me with CSS debug mode turned on.

I guess you are running into the general Windows development tax. Try
to locate your Products.CMFCore egg and the DirectoryView.py module in
it. Look for the "if platform == 'win32':" block and comment it out.
While you might not see all changes to files in skins folders being
picked up anymore, you should get the same performance as *nix users
have.

Hanno

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Alexander Limi Alexander Limi
Reply | Threaded
Open this post in threaded view
|

Re: Zope/ResourceRegistries debug modes in Plone 4

In reply to this post by Hanno Schlichting-4
Optimize for the common case, and don't persist across restarts:

If debug mode on, show:

Resources are currently not merged, since you are in debug mode.

[ ] Merge resources anyway

No need for three settings. :)

--
Alexander Limi · http://limi.net


On Tue, Sep 29, 2009 at 5:25 AM, Hanno Schlichting <[hidden email]> wrote:
On Tue, Sep 29, 2009 at 11:43 AM, Martin Aspeli
<[hidden email]> wrote:
> Eric Steele wrote:
>> Since users tend to be, well... absolutely terrified to run bin/
>> buildout, is there another way to solve this? Or am I missing
>> something about the way this was intended to work?

Actually I tried to come up with some way to disable css/js debug mode
while the global zope development was still on. I just gave up on it,
as I couldn't make the UI for that work in an easy way.

Thinking about it again, instead of a simple checkbox you'd probably have to do:

Debug mode:

(x) - Determined globally (currently turned <on|off>)
( ) - Enable debug mode
( ) - Disable debug mode

If you explicitly set a persistent setting, then you always get it,
otherwise you can just use the global mode. The UI would need to tell
you what the global setting currently is.

Anyone who feels like wielding some ZMI screen magic?

Hanno

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Alexander Limi · http://limi.net

Dylan Jay Dylan Jay
Reply | Threaded
Open this post in threaded view
|

Re: Zope/ResourceRegistries debug modes in Plone 4

In reply to this post by Hanno Schlichting-4


On 30/09/2009, at 12:53 AM, Hanno Schlichting wrote:

> On Tue, Sep 29, 2009 at 4:33 PM, Anthony Gerrard
> <[hidden email]> wrote:
>> I think this is quite important (at least for me).  If you run with  
>> CSS debug switched on then testing through the web is a lot  
>> slower.  Having the option to run Zope in debug mode but not have  
>> CSS on debug is a good thing.  I develop on windows and only ever  
>> run zope in foreground mode when developing.
>
> Hhm. Testing TTW isn't noticeably slower for me with CSS debug mode  
> turned on.
>
> I guess you are running into the general Windows development tax. Try
> to locate your Products.CMFCore egg and the DirectoryView.py module in
> it. Look for the "if platform == 'win32':" block and comment it out.
> While you might not see all changes to files in skins folders being
> picked up anymore, you should get the same performance as *nix users
> have.

I've found it at times too slow on the mac to debug when css is in  
debug mode so I'd like to be able to turn it off but still be in  
general development mode.
I do however like the idea of taking it out of the zodb since there  
are plenty of times css debug gets accidentally turned off. However  
there are also cases where I turn on css debugging on production to  
reset the css caching adn other debugging purposes so it would be good  
not to lose that.


>
> Hanno
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart  
> your
> developing skills, take BlackBerry mobile applications to market and  
> stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register  
> now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Plone-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/plone-developers


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers