# Debug msg - but which tab?

**URL:** <https://discourse.nodered.org/t/debug-msg-but-which-tab/81858>\
**Category:** General\
**Tags:** debugging\
**Created:** [8 October 2023 14:39 UTC](https://discourse.nodered.org/t/debug-msg-but-which-tab/81858 "2023-10-08T14:39:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![StrongTown](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@StrongTown](https://discourse.nodered.org/u/StrongTown)\
**Post date:** [8 October 2023 14:39 UTC](https://discourse.nodered.org/t/debug-msg-but-which-tab/81858/1 "2023-10-08T14:39:25Z")

</div>

I have searched this but not found any helpful items.

I have a fairly extensive (large) NR program running various things for my home control. There are 18 tabs and a significant amount of JS code. The flows\_xxxxxxxxxxxxx.json file is 774Kb.

When I have debug set to " **all nodes**" and I look at an item I cannot tell which tab that msg was generated from. Here is an example:

```auto
10/4/2023, 2:59:59 AM[node: 8b4aaae7.fc5298]'(http://192.168.xxx.xxx:1880/#)
msg.payload : Object

object
code: 0

```

Is there a better way to identify the tab and node that generated the message other then switching to "current flow" and jumping through them all?

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [8 October 2023 14:51 UTC](https://discourse.nodered.org/t/debug-msg-but-which-tab/81858/2 "2023-10-08T14:51:32Z")

</div>

Click here - it will take you to the node

![Screenshot 2023-10-08 at 15.51.02](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/a/0ad52031404b0a7bcee58551e59ba1239306d044.png)

---

<div class="post-metadata">

**Author:** ![StrongTown](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@StrongTown](https://discourse.nodered.org/u/StrongTown)\
**Post date:** [8 October 2023 15:18 UTC](https://discourse.nodered.org/t/debug-msg-but-which-tab/81858/3 "2023-10-08T15:18:19Z")

</div>

Awesome. 😀 Thank you. That works great.

---

<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:** [8 October 2023 19:19 UTC](https://discourse.nodered.org/t/debug-msg-but-which-tab/81858/4 "2023-10-08T19:19:27Z")

</div>

Giving your debug nodes sensible names also helps you to spot things quickly.

---

<div class="post-metadata">

**Author:** ![StrongTown](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@StrongTown](https://discourse.nodered.org/u/StrongTown)\
**Post date:** [8 October 2023 20:48 UTC](https://discourse.nodered.org/t/debug-msg-but-which-tab/81858/5 "2023-10-08T20:48:19Z")

</div>

Not sure your meaning. All tabs and Nodes have sensible names. They just don't appear in the debug window. Only this does

> node: 8b4aaae7.fc5298

---

<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:** [9 October 2023 01:32 UTC](https://discourse.nodered.org/t/debug-msg-but-which-tab/81858/6 "2023-10-09T01:32:36Z")

</div>

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

Put a name into the debug node and you see that name in the debug output. Makes life a lot easier.

---

<div class="post-metadata">

**Author:** ![StrongTown](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@StrongTown](https://discourse.nodered.org/u/StrongTown)\
**Post date:** [9 October 2023 15:53 UTC](https://discourse.nodered.org/t/debug-msg-but-which-tab/81858/7 "2023-10-09T15:53:20Z")

</div>

I don't know how to use this when the error is generated within code I'm writing.

---

<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:** [9 October 2023 16:40 UTC](https://discourse.nodered.org/t/debug-msg-but-which-tab/81858/8 "2023-10-09T16:40:58Z")

</div>

Sorry, I think we may be talking at cross-purposes.

What I showed was the settings for a debug node in your flow. Simply edit the default "Debug xxxx" name and replace it with something more meaningful. Then, when it receives a message, the debug panel will have the name not just the reference ID. May save you having to always click the id simply to see where the debug came from.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [9 October 2023 16:41 UTC](https://discourse.nodered.org/t/debug-msg-but-which-tab/81858/9 "2023-10-09T16:41:27Z")

</div>

if you are trying to debug a `function` node use  
`node.warn('db01= ' + some_variable)`

For example, with this code:

```auto
let b = "i am a bug"
node.warn('db1= ' + b)
return msg;

```

you will get this:  
 ![Screenshot 2023-10-09 at 12.40.35 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/e/8e9e1b25ee58ebbf4b5f6e9f1392c476aeb9b0e9.png)

---

<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:** [23 October 2023 16:41 UTC](https://discourse.nodered.org/t/debug-msg-but-which-tab/81858/10 "2023-10-23T16:41:31Z")

</div>

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