[web2py] Re: I seem to block the server if I forget about dbg.set_trace

2013-02-01 Thread Tim Richardson
No, I'm wrong, the examples app does appear on the mac, there was a long 
delay. Sometimes rocket is very slow to respond on the mac.



>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: I seem to block the server if I forget about dbg.set_trace

2013-02-01 Thread Tim Richardson


On Saturday, 2 February 2013 09:42:38 UTC+11, Mariano Reingart wrote:
>
> Thanks you for reporting it! 
>
> BTW, it should not block other applications, just the thread that is 
> serving the controller with the breakpoint code. 
> In fact, admin is just another web2py app, if it works, any other app 
> should work. 
>
> I don't know if there is anything mac-specific going on here, but 
> surely it is not the standar designed behavior of the debugger (and it 
> not happening in other platforms). 
>
> If you do more test, I'll be glad to help you with this, 
>
> Hi Mariano,
>
it seems to block other applications on both Windows and Mac. The behaviour 
in my issue report is what I see, except that I didn't try going directly 
to the admin app. So if you make that trivial change in the wecome app to 
do a dbg.set_trace() in the index controller, it will stall when going to 
welcome, and I also experience stalls in every other app. For example, I 
just tried again
a) started web2py using rocket
b) went straight to admin, and via the editor I changed the default 
controller of the welcome app
c) in other browser tab, went to welcome and it stalled on that tab
d) back in the admin app, I tried to access the examples app by clicking 
the link "examples" (which is http://127.0.0.1:8000/examples/default/index)
but it stalls.

 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: I seem to block the server if I forget about dbg.set_trace

2013-02-01 Thread Mariano Reingart
Thanks you for reporting it!

BTW, it should not block other applications, just the thread that is
serving the controller with the breakpoint code.
In fact, admin is just another web2py app, if it works, any other app
should work.

I don't know if there is anything mac-specific going on here, but
surely it is not the standar designed behavior of the debugger (and it
not happening in other platforms).

If you do more test, I'll be glad to help you with this,

Best regards

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com


On Fri, Feb 1, 2013 at 6:51 PM, Tim Richardson  wrote:
>
>
> On Saturday, 2 February 2013 08:45:14 UTC+11, Tim Richardson wrote:
>>
>> You're right, on my local installation (trunk) I *can* go the admin page
>> and start a debug listener.
>> I'll try that on the Windows server.
>>>
>>>
>
> Thanks, this works on windows too. I can not start normal apps by visiting a
> link (they stall) but I can start the admin app and start a debug listener.
>
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: I seem to block the server if I forget about dbg.set_trace

2013-02-01 Thread Tim Richardson


On Saturday, 2 February 2013 08:45:14 UTC+11, Tim Richardson wrote:
>
> You're right, on my local installation (trunk) I *can* go the admin page 
> and start a debug listener.
> I'll try that on the Windows server.
>
>>
>>
Thanks, this works on windows too. I can not start normal apps by visiting 
a link (they stall) but I can start the admin app and start a debug 
listener.
 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: I seem to block the server if I forget about dbg.set_trace

2013-02-01 Thread Tim Richardson
You're right, on my local installation (trunk) I *can* go the admin page 
and start a debug listener.
I'll try that on the Windows server.

>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: I seem to block the server if I forget about dbg.set_trace

2013-02-01 Thread Tim Richardson
This is with rocket (I just run python web2py.py)

I just tried it again, with trunk, having changed the index controller on 
the welcome app [put a dbg.set_trace()] and then starting 
python web2py.py (this time on my mac, it's not platform dependent)

Rocket stalls, we never make it to the welcome screen. No new sessions can 
be opened, so there is no possibility to start a debug listener. 


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: I seem to block the server if I forget about dbg.set_trace

2013-02-01 Thread Mariano Reingart
Sorry, I cannot reproduce your issue.

Putting dbg.set_trace() blocks your app until your open the debbuger
interaction page:

http://127.0.0.1:8000/admin/debug/interact

As soon as I open it, I can continue and debug it properly.
If I don't open it, the page being debugged is blocked, but other
pages could be opened (including admin).

What webserver are you using?
How is it configured?

You need to be runing a multithreaded webserver (with only one
process) to use the embeed debugger.

(I checked the mercurial trunk)

Best regards,

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com


On Fri, Feb 1, 2013 at 7:49 AM, Tim Richardson  wrote:
> Maybe I'm doing something wrong, because I get the same problem on mac with
> the latest git.
>
> I change the welcome app like so
>
> from gluon.debug import dbg
> def index():
> """
> example action using the internationalization operator T and flash
> rendered by views/default/index.html or views/generic.html
>
> if you need a simple wiki simple replace the two lines below with:
> return auth.wiki()
> """
> response.flash = T("Welcome to web2py!")
> dbg.set_trace()
> return dict(message=T('Hello World'))
>
>
> visit the page (with no debugger open) and the same thing happens. No more
> connections to the server possible.
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: I seem to block the server if I forget about dbg.set_trace

2013-02-01 Thread Tim Richardson
Maybe I'm doing something wrong, because I get the same problem on mac with 
the latest git.

I change the welcome app like so

from gluon.debug import dbg
def index():
"""
example action using the internationalization operator T and flash
rendered by views/default/index.html or views/generic.html

if you need a simple wiki simple replace the two lines below with:
return auth.wiki()
"""
response.flash = T("Welcome to web2py!")
dbg.set_trace()
return dict(message=T('Hello World'))


visit the page (with no debugger open) and the same thing happens. No more 
connections to the server possible. 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: I seem to block the server if I forget about dbg.set_trace

2013-01-31 Thread Tim Richardson
I can reproduce it and I think my observations above are completely correct.
So I raised an issue.

http://code.google.com/p/web2py/issues/detail?id=1313

 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: I seem to block the server if I forget about dbg.set_trace

2013-01-31 Thread Tim Richardson
dbg is the integrated web2py debugger in this case. 
The behaviour I observe is that rocket no longer reponds: I can't 
retrospectively open an admin session. I get no error tickets although 
maybe something is logged somewhere. I think it affects all users.
This is running on windows, latest stable.
I'll check more thoroughly and if I'm correct and if I can reproduce it, 
I'll file a report. 


On Friday, 1 February 2013 15:07:16 UTC+11, Tim Richardson wrote:
>
> I use dbg.set_trace for debugging.
> Usually I remember to run an instance of web2py on an additional port and 
> use that for my debugging.
> Sometime I forget to remove dbg.set_trace. 
> When I do that, I don't have a listening window open, so I guess rocket 
> stops but there is no one to hear it.
> I'm on Windows. 
> When this happens, the server stops responding to all requests. I restart 
> the Windows service (which is basically python web2py.py)
>
> Is there a more elegant way of dealing with this situation?
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.