From 6f39f9679960ef68de1d222b674c7be0a7cf68b7 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Tue, 4 Dec 2012 08:32:26 -0600 Subject: [PATCH] added interact.html to git --- VERSION | 2 +- applications/admin/views/debug/interact.html | 246 +++++++++++++++++++ 2 files changed, 247 insertions(+), 1 deletion(-) create mode 100644 applications/admin/views/debug/interact.html diff --git a/VERSION b/VERSION index 6b8153e7..0b229422 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.2.1 (2012-12-03 18:01:57) stable +Version 2.2.1 (2012-12-04 08:31:43) stable diff --git a/applications/admin/views/debug/interact.html b/applications/admin/views/debug/interact.html new file mode 100644 index 00000000..585c7e1e --- /dev/null +++ b/applications/admin/views/debug/interact.html @@ -0,0 +1,246 @@ +{{extend 'layout.html'}} + +{{block sectionclass}}debug{{end}} + + + +
+
+

{{=T("web2py online debugger")}}

+ + {{if filename:}} +

{{=T("Interaction at %s line %s") % (filename, lineno)}}

+ + {{if exception:}} +

{{=T("Exception %s", exception['title'])}}

+ {{pass}} + +
{{=T("Code listing")}}
+ {{if lines:}} +
{{=CODE('\n'.join([x[1] for x in sorted(lines.items(),key=lambda x: x[0])]),
+                language='python', link=None, counter=min(lines.keys()), 
+                highlight_line=lineno, context_lines=10)}}
+ {{pass}} + +
+
    +
  • {{=T("Your application will be blocked until you click an action button (next, step, continue, etc.)")}}
  • +
  • {{=T("Your can inspect variables using the console bellow")}}
  • +
+
+ + +

{{=T("Interactive console")}}

+ + +
+
+
>>>
+
autoscroll
+
+ + {{=T("Type python statement in here and hit Return (Enter) to execute it.")}} +
+
+
+ {{elif request.env.get('wsgi_multiprocess') or not request.env.get('wsgi_multithread'):}} +

{{=T("Unsupported webserver working mode: %s", request.env.get('server_software', ''))}}

+
+
  • {{=T("WARNING:")}} {{=T("This debugger may not work properly if you don't have a threaded webserver or you're using multiple daemon processes.")}}
  • +
  • {{=T("In development, use the default Rocket webserver that is currently supported by this debugger.")}}
  • +
  • {{=T("On production, you'll have to configure your webserver to use one process and multiple threads to use this debugger.")}}
  • + +
    + {{#=BEAUTIFY(request.env)}} + {{else:}} +

    {{=T("No Interaction yet")}}

    +
    +
      +
    • {{=T("You need to set up and reach a")}} {{=A(T("breakpoint"), _href=URL('breakpoints'))}} {{=T('to use the debugger!')}}
    • +
    • {{=T('To emulate a breakpoint programatically, write:')}} + {{=CODE("from gluon.debug import dbg\n" + "dbg.set_trace() # stop here!\n", + counter=None)}}
    • +
    • {{=T('Please')}} {{=A(T("refresh"), _href=URL('interact'))}} {{=T('this page to see if a breakpoint was hit and debug interaction is required.')}}
    • +
    +
    + {{pass}} +
    +
    + + + + + + +