diff --git a/app.py b/app.py
index db07845..4c83d8c 100755
--- a/app.py
+++ b/app.py
@@ -80,9 +80,11 @@ def shutdown_session(exception=None):
 @app.errorhandler(InternalServerError)
 def exception_handler(e):
     tb = get_current_traceback()
-    last_frame_args = inspect.getargs(tb.frames[-1].code)
+    last_frame = tb.frames[-1]
+    last_frame_args = inspect.getargs(last_frame.code)
     return render_template('show_error.html',
                            tb=tb,
+                           last_frame=last_frame,
                            last_frame_args=last_frame_args), 500
 
 @app.template_global()
diff --git a/templates/show_error.html b/templates/show_error.html
index 0c7a9af..a9159d0 100644
--- a/templates/show_error.html
+++ b/templates/show_error.html
@@ -11,9 +11,10 @@
 <div>
   <pre>{{ tb.exception }}</pre>
 
-<p>Error in function "{{ tb.frames[-1].function_name }}":
-   {{ last_frame_args | pprint }}</p>
-
+<p>Error in function "{{ tb.frames[-1].function_name }}"<br>
+  {{ last_frame_args | pprint }}<br>
+  locals: {{ last_frame.locals | pprint }}
+<p>
 </div>
 
 {% set body %}