From 4ca3df77b33cae4c662810e1f4274efb6acef7dc Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Thu, 22 Dec 2016 13:27:27 +0000 Subject: [PATCH] =?UTF-8?q?Add=20=E2=87=B6=20to=20debug=20node=20to=20indi?= =?UTF-8?q?cate=20debugging=20also=20to=20console.log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nodes/core/core/58-debug.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nodes/core/core/58-debug.html b/nodes/core/core/58-debug.html index ada8a1c12..6d00fe837 100644 --- a/nodes/core/core/58-debug.html +++ b/nodes/core/core/58-debug.html @@ -41,7 +41,7 @@

The button to the right of the node will toggle its output on and off so you can de-clutter the debug window.

If the payload is an object or buffer it will be stringified first for display and indicate that by saying "(Object)" or "(Buffer)".

Selecting any particular message will highlight (in red) the debug node that reported it. This is useful if you wire up multiple debug nodes.

-

Optionally can show the complete msg object, and send messages to the console log.

+

Optionally can show the complete msg object, and send messages to the console log (⇶).

In addition any calls to node.warn or node.error will appear here.

@@ -58,10 +58,12 @@ complete: {value:"false", required:true} }, label: function() { + var suffix = ""; + if (this.console === true || this.console === "true") { suffix = " ⇶"; } if (this.complete === true || this.complete === "true") { - return this.name||"msg"; + return (this.name||"msg") + suffix; } else { - return this.name || "msg." + ((!this.complete || this.complete === "false") ? "payload" : this.complete); + return (this.name || "msg." + ((!this.complete || this.complete === "false") ? "payload" : this.complete)) + suffix; } }, labelStyle: function() {