# Node-RED Debug Sidebar Console Printing Colored Text

**URL:** <https://discourse.nodered.org/t/node-red-debug-sidebar-console-printing-colored-text/76494>\
**Category:** General\
**Created:** [13 March 2023 05:11 UTC](https://discourse.nodered.org/t/node-red-debug-sidebar-console-printing-colored-text/76494 "2023-03-13T05:11:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aisyahshamsaimun](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aisyahshamsaimun/32/74151_2.png) [@aisyahshamsaimun](https://discourse.nodered.org/u/aisyahshamsaimun)\
**Post date:** [13 March 2023 05:11 UTC](https://discourse.nodered.org/t/node-red-debug-sidebar-console-printing-colored-text/76494/1 "2023-03-13T05:11:38Z")

</div>

Hello,

I am looking for a way for the Node-RED debug sidebar tab to be able to print **colored text** instead of in **code form** as shown in the picture below.

 ![Screenshot_12](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/d/fdecbfad88e41ef362a65cee1c6c9fc9bb5b4652.png)  
These message payloads are coming from a serial connection between Node-Red to a Linux device during booting.

I've tried installing chalk and colors but it doesn't work the way I wanted. Maybe I am missing something in the process.

Appreciate any help given!

---

<div class="post-metadata">

**Author:** ![cameo69](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cameo69/32/66593_2.png) [@cameo69](https://discourse.nodered.org/u/cameo69)\
**Post date:** [13 March 2023 06:55 UTC](https://discourse.nodered.org/t/node-red-debug-sidebar-console-printing-colored-text/76494/2 "2023-03-13T06:55:06Z")

</div>

Chalk is for the log output.  
If I remember correctly the debug output cannot be coloured.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 March 2023 09:16 UTC](https://discourse.nodered.org/t/node-red-debug-sidebar-console-printing-colored-text/76494/3 "2023-03-13T09:16:08Z")

</div>

Yes the debug sidebar is rendered as html - so doesn't handle ansi codes.. but also to prevent code injection we don't interpret tags either.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [13 March 2023 09:37 UTC](https://discourse.nodered.org/t/node-red-debug-sidebar-console-printing-colored-text/76494/4 "2023-03-13T09:37:07Z")

</div>

If you really want to monitor those with colour, a custom Node-RED logging function would do it. Quite a lot of work for potentially little benefit though. Maybe pass through a change or function node before sending to debug and filtering the control codes out of the text.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 March 2023 10:39 UTC](https://discourse.nodered.org/t/node-red-debug-sidebar-console-printing-colored-text/76494/5 "2023-03-13T10:39:25Z")

</div>

you can set the console output to use colours by the settings.js `debugUseColors: true,` option - but this only does the console output... not the debug sidebar.

---

<div class="post-metadata">

**Author:** ![aisyahshamsaimun](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aisyahshamsaimun/32/74151_2.png) [@aisyahshamsaimun](https://discourse.nodered.org/u/aisyahshamsaimun)\
**Post date:** [14 March 2023 02:48 UTC](https://discourse.nodered.org/t/node-red-debug-sidebar-console-printing-colored-text/76494/6 "2023-03-14T02:48:38Z")

</div>

What I'm trying to achieve is to extract data coming through the serial port after executing a Linux command and processing it through node-red functions. Right now, it is quite difficult to extract the data due to the weird symbol.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/e/eee6f43ddcbd4f4f561cdd6f27c50d5930e66a36.png)

For example, based on the picture above, I'm executing memtester command and wanted to extract the **OK** and process it in the function node and display it on the dashboard if the test is passed or failed. I can't specify the location of **OK** because when testing different amounts of memory the location of **OK** will be different.

By setting debugUseColors: true in the setting.js, will it remove the symbols and tag? Or is there any other suggestion on how to approach this? The color is not the priority, if I can filter the weird symbols/color tag to have cleaner data input that would be great.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 May 2023 02:49 UTC](https://discourse.nodered.org/t/node-red-debug-sidebar-console-printing-colored-text/76494/7 "2023-05-13T02:49:00Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
