Something like this?
You could then add something to "debugger/scriptadd/x", which would then be converted to "debugger/x" on first save (or load)
Yes it's a hack, but minimally intrusive, and the whole AddToExtension interface seems a bit q&d to me...