aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/app.js
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2017-06-13 14:19:15 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-12-01 14:46:03 +0000
commit2d79df9f71256880dbc237d36335213e7f6dd8d1 (patch)
treefd1cee53cfc1f0cdffbc1a21bb77cbd477e44d0d /www/js/app.js
parent063d772657a98c96b79000199701eb8dd8cd8c07 (diff)
Make debugging app startup easier by saving debug messages
Diffstat (limited to 'www/js/app.js')
-rw-r--r--www/js/app.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/www/js/app.js b/www/js/app.js
index 282e921..9e8ced1 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -100,6 +100,11 @@ var tpl = {
printDebug: function(msg) {
if ( CONFIG.DEBUG ) {
console.log(msg);
+
+ // Some messages get logged before we've had a chance to
+ // attach the debugger, so keep them all for later reference.
+ FMS.debug_messages = FMS.debug_messages || [];
+ FMS.debug_messages.push(msg);
}
},