# Simple debugging of Dashboard Widget

**URL:** <https://discourse.nodered.org/t/simple-debugging-of-dashboard-widget/7530>\
**Category:** Developing Nodes\
**Created:** [3 February 2019 16:38 UTC](https://discourse.nodered.org/t/simple-debugging-of-dashboard-widget/7530 "2019-02-03T16:38:23Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [4 February 2019 13:21 UTC](https://discourse.nodered.org/t/simple-debugging-of-dashboard-widget/7530/6 "2019-02-04T13:21:58Z")

</div>

> [@Colin](#):
>
> but it still doesn't respond to messages

Hey Colin,

We will have to analyse it step by step ...  
When you look at the node-red-contrib-ui-led [code](https://github.com/Adorkable/node-red-contrib-ui-led/blob/master/led.js#L82), you will see that the 'update' function is called as soon as a message arrives:

```auto
$scope.$watch('msg', update);

```

The dashboard handles automatically all the message communication for you, and stores the message on the AngularJs scope (see drawing [here](https://discourse.nodered.org/t/use-scope-in-ui-nodes/6804/8)). As soon as the msg on the scope is updated, the watch will detect the change an execute the 'update' callback function ...

So if I were you, I would add a `debugger` statement in that function:

```auto
var update = (msg) => {
         debugger;
         if (!msg) {
	       return;
	 }

```

If you open the developer tools of your browser, the debugger should stop at the `debugger` statement as soon as you inject a message.

- If you don't arrive at your statement, there must be an issue in the dashboard communication.
- If you arrive at your statement, the led-node isn't handling the input message content correctly ...

Bart

---

_[View the full topic](https://discourse.nodered.org/t/simple-debugging-of-dashboard-widget/7530)._
