Here is a flow that will renumber all the numbered debug nodes in a flows file. Configure the paths in the inject node, run the flow, replace the flows file with the one generated by the flow and restart node red. You do, of course, already have a backup of your flows file just in case.
[{"id":"2a1220f4e0f4ad64","type":"group","z":"bdd7be38.d3b55","name":"Rationalise debug node numbering","style":{"label":true},"nodes":["4cbc1bf30977dc4d","b6c70c743e51889d","8b2ca0887d7c0a3e","5b51b44a83135ec3","fefb82892cbc35d0","e60ea84d9655fc06","f6a6e6641bad366a"],"x":174,"y":3339,"w":972,"h":202},{"id":"4cbc1bf30977dc4d","type":"inject","z":"bdd7be38.d3b55","g":"2a1220f4e0f4ad64","name":"Configure paths in here","props":[{"p":"flowfilePath","v":"/home/colinl/.node-red/flows.json","vt":"str"},{"p":"outPath","v":"/home/colinl/.node-red/flows.new.json","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":320,"y":3380,"wires":[["b6c70c743e51889d"]]},{"id":"b6c70c743e51889d","type":"file in","z":"bdd7be38.d3b55","g":"2a1220f4e0f4ad64","name":"Read flow file","filename":"flowfilePath","filenameType":"msg","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":550,"y":3380,"wires":[["5b51b44a83135ec3"]]},{"id":"8b2ca0887d7c0a3e","type":"debug","z":"bdd7be38.d3b55","g":"2a1220f4e0f4ad64","name":"debug 14","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":910,"y":3500,"wires":[]},{"id":"5b51b44a83135ec3","type":"json","z":"bdd7be38.d3b55","g":"2a1220f4e0f4ad64","name":"","property":"payload","action":"","pretty":false,"x":750,"y":3380,"wires":[["fefb82892cbc35d0"]]},{"id":"fefb82892cbc35d0","type":"function","z":"bdd7be38.d3b55","g":"2a1220f4e0f4ad64","name":"Rationalise debug node names","func":"// msg.payload should include a flow file as an array of objects\nlet debugNumber = 1\nmsg.payload = msg.payload.map(rationalise) \nreturn msg;\n\nfunction rationalise(item) {\n let answer = item\n if (item.type === \"debug\") {\n // check for name \"debug nnn\"\n if (item.name.match(/debug [0-9]+$/)) {\n //node.warn(`matching debug node found: ${JSON.stringify(item)}`)\n // Change the name to an incrementing debug number\n answer.name = `debug ${debugNumber++}`\n //node.warn(`changed to: ${JSON.stringify(answer)}`)\n }\n }\n return answer\n}","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":990,"y":3380,"wires":[["f6a6e6641bad366a"]]},{"id":"e60ea84d9655fc06","type":"file","z":"bdd7be38.d3b55","g":"2a1220f4e0f4ad64","name":"Write flow file","filename":"outPath","filenameType":"msg","appendNewline":false,"createDir":false,"overwriteFile":"true","encoding":"none","x":730,"y":3460,"wires":[["8b2ca0887d7c0a3e"]]},{"id":"f6a6e6641bad366a","type":"json","z":"bdd7be38.d3b55","g":"2a1220f4e0f4ad64","name":"","property":"payload","action":"","pretty":true,"x":550,"y":3460,"wires":[["e60ea84d9655fc06"]]}]