# 📺 Live streaming some Node-RED development work

**URL:** https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856
**Category:** Core Development
**Created:** [18 May 2020 15:16 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856 "2020-05-18T15:16:20Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [18 May 2020 15:16 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/1 "2020-05-18T15:16:21Z")

</div>

Trying something a bit different tonight....

If you're interested in how to get started developing Node-RED itself, I'm doing a live stream this evening to walk through adding a new feature to the editor.

It's all pretty informal - I have a rough idea what I'll be doing. And if it goes well, I'll make it a semi-regular thing.

All being well (and the kids obliging at bedtime) I'll be going live at 8pm BST here: [https://www.twitch.tv/knolleary](https://www.twitch.tv/knolleary) - you can join the chat there.

Don't worry if you miss it - a replay will be available afterwards.

---

<div class="post-metadata">

### Author: ![Brew](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/brew/32/19776_2.png) [@Brew](https://discourse.nodered.org/u/Brew)
#### Post date: [18 May 2020 20:21 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/2 "2020-05-18T20:21:30Z")

</div>

Really interesting thanks for sharing Nick, really great insight into how it all works and the effort that you all go to to make this such a fantastic platform. Thank you.

---

<div class="post-metadata">

### Author: ![cinhcet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cinhcet/32/438_2.png) [@cinhcet](https://discourse.nodered.org/u/cinhcet)
#### Post date: [18 May 2020 21:05 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/3 "2020-05-18T21:05:44Z")

</div>

Hi Nick,

this was a lot of fun! Thank you! And I totally agree that a great step forward for NR would be to enable other people to contribute to the core/editor.

I created a PR [https://github.com/node-red/node-red/pull/2570](https://github.com/node-red/node-red/pull/2570) which implements two new editor actions to disable all debug nodes either on the current flow or globally.  
I know that I have not discussed that properly on the forum first (I mentioned it in a thread, but no real discussion), but I wanted to give you feedback that the stream actually enabled me to implement this, which I would not have been able to do so in this short amount of time. Especially getting things right like the history.  
On the other hand, I would be interested whether this is actually correct what I have done there.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [18 May 2020 21:07 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/4 "2020-05-18T21:07:15Z")

</div>

Ah i missed this ☹

I had a question on core development - would have been the perfect time to ask.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [18 May 2020 21:20 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/5 "2020-05-18T21:20:45Z")

</div>

You're always welcome to ask here 😊

Will be doing it again next week (all being well...)

@cinhcet thanks. Great to see a PR arrive so soon. Will review the details in the morning. At a glance, the concept is fine, but in this instance, the action needs to live in the debug node's html as it's debug node specific.

---

<div class="post-metadata">

### Author: ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)
#### Post date: [19 May 2020 16:50 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/6 "2020-05-19T16:50:20Z")

</div>

Just watched the replay, thanks! I can't think of a better way to bring up the confidence of would be future contributors.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [1 June 2020 15:43 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/7 "2020-06-01T15:43:47Z")

</div>

Bumping this topic as I'll be streaming again tonight.

With the 1.1.0 beta coming very soon, I'm not 100% sure what I'll be working on, so if there's something in particular you'd like me to cover, let me know.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [6 June 2020 08:56 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/8 "2020-06-06T08:56:22Z")

</div>

Nick, i noticed in your latest showcase you were using `grunt dev` so that the client side src isnt minified.

What do you do if you need to debug server side (debug-step debugging in IDE) at the same time?

My preference is to F5 (run) but in order to do this I have to `npm run build` first - which as you said minifies the src.

So I often do a quick mod to grunt file to include `sourceMap: true`

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

This helps when debugging both client and server side (as I can see unminified in chrome & i can step debug server side) but any changes I make+save, I then need to...

- stop debugging
- `npm run build`
- F5 start debugging

(note: I use VSCode not Atom)

I am thinking there must be a way of setting this up so that debug in IDE causes sourceMaps to be built, `npm run build` to be executed & debug begins.

It is no major chore as it is but I wonder if you or anyone have any ideas on making this a more seamless operation?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [6 June 2020 12:28 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/9 "2020-06-06T12:28:49Z")

</div>

I have found a bit of a solution...

1. VSCODE: Modify launch.json ...

```auto
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "env": { "NODE_ENV": "development" },
            "preLaunchTask": "npm: build",
            "program": "${workspaceFolder}\\packages\\node_modules\\node-red\\red.js"
        }
    ]
}

```

1. VSCODE: Add an entry in tasks.json

```auto
{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "npm",
			"script": "build",
			"group": "build",
			"problemMatcher": [],
			"label": "npm: build",
			"detail": "dev build"
		}
	]
}

```

Now when you hit F5, `npm run build` is executed before the debugger launches.

Its not ideal as the `build` task does a whole bunch of other things like 'clean:build','jsonlint','concat:build','concat:vendor','copy:build','uglify:build','sass:build','attachCopyright'

* * *

#### Alternative / better solution...

An alternative solution is to add a new grunt task that does the required joining etc (skips the minification)

1. Modify `grunfile.js` to include another task (its the same as grunt dev but without nodemon)

```auto
  grunt.registerTask('build-dev',
      'Developer mode: build dev version',
      ['clean:build','concat:build','concat:vendor','copy:build','sass:build','setDevEnv']);

```

1. in `package.json` add a new npm script

```auto
  "build-dev": "grunt build-dev",

```

1. VSCODE: Modify launch.json ...

```auto
  {
     "version": "0.2.0",
     "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "env": { "NODE_ENV": "development" },
            "preLaunchTask": "npm: build-dev",
            "program": "${workspaceFolder}\\packages\\node_modules\\node-red\\red.js"
        }
     ]
  }

```

1. VSCODE: Add an entry in tasks.json

```auto
{
    "version": "2.0.0",
    "tasks": [
         {
			"type": "npm",
			"script": "build-dev",
			"group": "build",
			"problemMatcher": [],
			"label": "npm: build-dev",
			"detail": "build-dev"
         }
    ]
}

```

This has the benefit of being much quicker due to not minifying the files.

@knolleary would you consider adding this grunt (`build-dev`) task to improve the development experience?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [7 June 2020 10:32 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/10 "2020-06-07T10:32:01Z")

</div>

Hi Nick (@knolleary) / Dave (@dceejay) would you mind if I raise a PR for this?

In summary...

- Adds `"build-dev": "grunt build-dev"` to `package.json` scripts
  - this permits `npm run build-dev`
  - skips minification & doesnt launch dev server - perfect for VSCodoe / Atom F5 step debugging in IDE

- Adds `"dev": "grunt dev"` to `package.json` scripts
  - this permits `npm run dev` for those without grunt installed globally

gruntfile.js...

```auto
    grunt.registerTask('build-dev',
        'Developer mode: build dev version',
        ['clean:build','concat:build','concat:vendor','copy:build','sass:build','setDevEnv']);

```

package.json...

```json
        "build-dev": "grunt build-dev",
        "dev": "grunt dev",

```

Thanks for the consideration.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [7 June 2020 11:05 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/11 "2020-06-07T11:05:00Z")

</div>

@Steve-Mcl i saw your previous message. There is no need to keep tagging me. I'm away from my laptop, I'll reply later.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [7 June 2020 12:45 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/12 "2020-06-07T12:45:44Z")

</div>

Sorry Nick. I blame the current situation - I sometimes forget what day it is 😕 .

Look forward to feedback / discussion.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [22 June 2020 18:20 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/13 "2020-06-22T18:20:09Z")

</div>

Bumping this thread to say I'll be streaming again in about 40 minutes. Do come say hi.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [27 June 2020 08:31 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/14 "2020-06-27T08:31:40Z")

</div>

Hi Nick, I realise how busy you will be with release 1.1.0 fast approaching. Have you had a moment to consider allowing a PR or slipping the small package/grunt file mods in to ease debug?

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [27 June 2020 08:44 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/15 "2020-06-27T08:44:24Z")

</div>

Raise a PR with your proposals. Otherwise it drops off my radar and gets forgotten.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [27 June 2020 09:45 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/16 "2020-06-27T09:45:49Z")

</div>

Will do ta.

Ps, which branch nick? Dev? Master?

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [27 June 2020 09:48 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/17 "2020-06-27T09:48:40Z")

</div>

At this point, `dev`.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [27 June 2020 10:40 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/18 "2020-06-27T10:40:40Z")

</div>

Done Nick

[PR](https://github.com/node-red/node-red/pull/2628)

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [26 August 2020 10:40 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/19 "2020-08-26T10:40:50Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [22 October 2020 21:09 UTC](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856/20 "2020-10-22T21:09:27Z")

</div>

Nick, Dave,

regarding the `grunt-dev` addition, it would probably be prudent for me to add some [info the the docs](https://github.com/node-red/node-red.github.io/blob/master/docs/getting-started/development.md) for anyone trying to get to grips with F5 debug running node-red in VSCode as described above.

Are you ok with me doing a PR for this?

[Next page](https://discourse.nodered.org/t/live-streaming-some-node-red-development-work/26856.md?page=2)
