# Resetting the default debug node name

**URL:** <https://discourse.nodered.org/t/resetting-the-default-debug-node-name/92285>\
**Category:** General\
**Created:** [10 October 2024 10:37 UTC](https://discourse.nodered.org/t/resetting-the-default-debug-node-name/92285 "2024-10-10T10:37:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaderag](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vaderag/32/95219_2.png) [@vaderag](https://discourse.nodered.org/u/vaderag)\
**Post date:** [10 October 2024 10:37 UTC](https://discourse.nodered.org/t/resetting-the-default-debug-node-name/92285/1 "2024-10-10T10:37:56Z")

</div>

This is really not that important, but my debug notes were at around 50 so when I created a new debug node it was named "debug 55" or whatever

I coped someone's very helpful flow from here, and it must have bought in their number on the debug node, so now new debug nodes are numbered "debug 2576" onwards

Is there any way to reset this!?

As I say, it's not the end of the world just a little thing that's irking me!

---

<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:** [10 October 2024 10:46 UTC](https://discourse.nodered.org/t/resetting-the-default-debug-node-name/92285/2 "2024-10-10T10:46:21Z")

</div>

Hi @vaderag

The code currently uses the largest number it finds plus one. No way to reset it other than renaming your highly numbered nodes to something lower.

I agree that isn't idea behaviour. Perhaps it would be better to find the first 'gap' in the numbering.

---

<div class="post-metadata">

**Author:** ![vaderag](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vaderag/32/95219_2.png) [@vaderag](https://discourse.nodered.org/u/vaderag)\
**Post date:** [10 October 2024 10:58 UTC](https://discourse.nodered.org/t/resetting-the-default-debug-node-name/92285/3 "2024-10-10T10:58:02Z")

</div>

That'll work for me - if renaming does the trick then that's a couple of minutes job 🙂

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [10 October 2024 12:10 UTC](https://discourse.nodered.org/t/resetting-the-default-debug-node-name/92285/4 "2024-10-10T12:10:50Z")

</div>

this was discussed here

> [@Debug node - incrementing ID](https://discourse.nodered.org/t/debug-node-incrementing-id/91842):
>
> I'm currently using just 15 debug nodes in my flows, but because I use a lot of debugs temporarily, testing new ideas, learning, answering forum questions, etc, I'm already up to an ID of 2482 grin Is there a way to order a re-numbering of the ID's, or is that number due to rise ad infinitum? I of course realize that I could recycle the debug nodes, but I always like to keep my workspace clear, without orphaned nodes hanging around. [debug]

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [10 October 2024 12:14 UTC](https://discourse.nodered.org/t/resetting-the-default-debug-node-name/92285/5 "2024-10-10T12:14:44Z")

</div>

I can make this improvement 🙃

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [10 October 2024 13:01 UTC](https://discourse.nodered.org/t/resetting-the-default-debug-node-name/92285/6 "2024-10-10T13:01:58Z")

</div>

> <https://github.com/node-red/node-red/pull/4912>
>
> \- \[\] Bugfix (non-breaking change which fixes an issue)
> \- \[x\] New feature (non-…breaking change which adds functionality)
> 
> \## Proposed changes
> 
> As discussed in the \[forum\](https://discourse.nodered.org/t/resetting-the-default-debug-node-name/92285), this PR improves the auto-generation of the node name to take the first available number.
> 
> So if existing numbers are 1,3 and 4. The new number is 2 instead of 5.
> 
> \## Checklist
> 
> \- \[x\] I have read the \[contribution guidelines\](https://github.com/node-red/node-red/blob/master/CONTRIBUTING.md)
> \- \[x\] For non-bugfix PRs, I have discussed this change on the forum/slack team.
> \- \[x\] I have run \`npm run test\` to verify the unit tests pass
> \- \[\] I have added suitable unit tests to cover the new/changed functionality

---

<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:** [8 January 2025 13:02 UTC](https://discourse.nodered.org/t/resetting-the-default-debug-node-name/92285/7 "2025-01-08T13:02:41Z")

</div>

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