# How to get detailed stack information

**URL:** <https://discourse.nodered.org/t/how-to-get-detailed-stack-information/74530>\
**Category:** General\
**Tags:** function-node\
**Created:** [1 February 2023 03:06 UTC](https://discourse.nodered.org/t/how-to-get-detailed-stack-information/74530 "2023-02-01T03:06:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeungChunChiu](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/leungchunchiu/32/63211_2.png) [@LeungChunChiu](https://discourse.nodered.org/u/LeungChunChiu)\
**Post date:** [1 February 2023 03:06 UTC](https://discourse.nodered.org/t/how-to-get-detailed-stack-information/74530/1 "2023-02-01T03:06:29Z")

</div>

```auto
[
    {
        "id": "c5bb02e15e36ccd2",
        "type": "inject",
        "z": "e24cd2d1b0061f29",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 270,
        "y": 180,
        "wires": [
            [
                "bbb9cc5207c1c623"
            ]
        ]
    },
    {
        "id": "bbb9cc5207c1c623",
        "type": "function",
        "z": "e24cd2d1b0061f29",
        "name": "function",
        "func": "const fun = (item) => {\n if (item.num == 1) {\n return msg\n }\n}\n\nconst main = () => {\n return fun(null);\n}\n\nreturn main();",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 500,
        "y": 180,
        "wires": [
            []
        ]
    },
    {
        "id": "439fa290471aed52",
        "type": "catch",
        "z": "e24cd2d1b0061f29",
        "name": "",
        "scope": null,
        "uncaught": false,
        "x": 280,
        "y": 280,
        "wires": [
            [
                "58a3e9efbffe0f28"
            ]
        ]
    },
    {
        "id": "58a3e9efbffe0f28",
        "type": "debug",
        "z": "e24cd2d1b0061f29",
        "name": "debug",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 490,
        "y": 280,
        "wires": []
    }
]

```

The above is a test code, The following is the **msg.error** information  
 ![1675220530662](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/8/38552dfcdbcb5ad3813d4d7df67520f2af6e6365.png)

My problem is that when there are many codes in the function, it is difficult to accurately locate the specific error location only by the existing error information. Is there any way to display the stack information?

Pls help, 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:** [2 April 2023 03:07 UTC](https://discourse.nodered.org/t/how-to-get-detailed-stack-information/74530/2 "2023-04-02T03:07:19Z")

</div>

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