# Feature request: Attach debug node to the IN connector on a node

**URL:** <https://discourse.nodered.org/t/feature-request-attach-debug-node-to-the-in-connector-on-a-node/14661>\
**Category:** Feature Requests\
**Created:** [22 August 2019 20:00 UTC](https://discourse.nodered.org/t/feature-request-attach-debug-node-to-the-in-connector-on-a-node/14661 "2019-08-22T20:00:01Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [23 August 2019 07:02 UTC](https://discourse.nodered.org/t/feature-request-attach-debug-node-to-the-in-connector-on-a-node/14661/21 "2019-08-23T07:02:22Z")

</div>

No, unfortunately not yet. As I developed it mainly during work hours, I need to get permission from the superiors.

Our developer team is rather small, so "officially" maintaining open source projects is a matter of resources. But personally, I would really like to share some of the stuff and give it back to the community. My plan is to open-source it as a personal project once that is resolved. 🙂

---

<div class="post-metadata">

**Author:** ![Alacritous](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Alacritous](https://discourse.nodered.org/u/Alacritous)\
**Post date:** [23 August 2019 07:20 UTC](https://discourse.nodered.org/t/feature-request-attach-debug-node-to-the-in-connector-on-a-node/14661/22 "2019-08-23T07:20:52Z")

</div>

Well, after reading this thread and checking out some other pages. I came up with a solution. A simple passthrough subflow-node thingy. It is simply a subflow with one input and one output and passes through any msg object as is and outputs the object to the debug tab.

Here's my solution. Modify as you wish. This'll kinda do the trick for me, I guess.

```auto
[
    {
        "id": "c2bcad1.0c3e4d",
        "type": "subflow",
        "name": "Inline Debug",
        "info": "",
        "category": "",
        "in": [
            {
                "x": 160,
                "y": 180,
                "wires": [
                    {
                        "id": "bd6896fe.f4e21"
                    }
                ]
            }
        ],
        "out": [
            {
                "x": 480,
                "y": 180,
                "wires": [
                    {
                        "id": "bd6896fe.f4e21",
                        "port": 0
                    }
                ]
            }
        ],
        "env": [],
        "icon": "node-red/debug.png"
    },
    {
        "id": "bd6896fe.f4e21",
        "type": "function",
        "z": "c2bcad1.0c3e4d",
        "name": "",
        "func": "node.warn(msg);\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 310,
        "y": 180,
        "wires": [
            []
        ]
    },
    {
        "id": "b87aeaf7.af81f",
        "type": "subflow:c2bcad1.0c3e4d",
        "z": "c5627bb2.08bf88",
        "name": "",
        "x": 590,
        "y": 240,
        "wires": [
            [
                "253e234.f55eb5c"
            ]
        ]
    }
]

```

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [24 August 2019 10:02 UTC](https://discourse.nodered.org/t/feature-request-attach-debug-node-to-the-in-connector-on-a-node/14661/23 "2019-08-24T10:02:41Z")

</div>

What a brilliantly simple idea 🙂

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [24 August 2019 23:37 UTC](https://discourse.nodered.org/t/feature-request-attach-debug-node-to-the-in-connector-on-a-node/14661/24 "2019-08-24T23:37:33Z")

</div>

I had a quick look at it.

Just one thing though:  
How do you turn it off so you don't see the output?

Why:  
Well, I get that you need `debug` nodes when making flows.  
But once they are working, getting outputs is introducing overheads which may not be wanted/needed.  
Deleting the nodes could be painful.

My way around the problem is using the `FAN` node.  
(yeah, an empty `function` node could work too. But the _advantage_ with the `fan` node is that it is green, and you know it isn't simply an empty `function` node.)

So my flows (where needed) look something like this:

 ![Screenshot%20from%202019-08-25%2009-36-14](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e8149a45a96634076b3c4f932c0ea814b3f3abc9.png)

---

<div class="post-metadata">

**Author:** ![Alacritous](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Alacritous](https://discourse.nodered.org/u/Alacritous)\
**Post date:** [25 August 2019 06:43 UTC](https://discourse.nodered.org/t/feature-request-attach-debug-node-to-the-in-connector-on-a-node/14661/25 "2019-08-25T06:43:51Z")

</div>

I added some stuff. to enable and disable the output and change the output from the msg object to just the payload. Now I'm having a whole new problem.

> [@Continuing from a feature request I made for a way to output debug information going INTO a node](https://discourse.nodered.org/t/continuing-from-a-feature-request-i-made-for-a-way-to-output-debug-information-going-into-a-node/14750):
>
> I've made a subflow that you can place inline with your flow that will just output the msg object or the msg.payload and can be enabled and disabled. But for the life of me, I can't get it to display its status. I've read the forum and searched and I can't see any real current documentation on node status. This is what I've got so far. Have a look and somebody, please tell me what I'm missing. Specifically, I'm trying to show the status on the subflow node when it is in a regular flow. See the…

---

<div class="post-metadata">

**Author:** ![Alacritous](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Alacritous](https://discourse.nodered.org/u/Alacritous)\
**Post date:** [25 August 2019 21:58 UTC](https://discourse.nodered.org/t/feature-request-attach-debug-node-to-the-in-connector-on-a-node/14661/26 "2019-08-25T21:58:42Z")

</div>

And the complete(ish) solution.

Be gentle.

> [@Inline node for debugging that can be enabled or disabled without deploying every time](https://discourse.nodered.org/t/inline-node-for-debugging-that-can-be-enabled-or-disabled-without-deploying-every-time/14771):
>
> After making a feature request and bumbling about with setting the node status from inside a function, I have my solution. Here is a subflow that is an inline debug output node. That can be enabled, or disabled and can be set to output the msg.payload only, or the entire msg object. Just like a regular debug node. But it can consolidate many connections in. as seen in this example: Instead of connecting a debug node to ALL of the outputs of the inject nodes AND where ever else the c…

[Previous page](https://discourse.nodered.org/t/feature-request-attach-debug-node-to-the-in-connector-on-a-node/14661.md?page=1)
