Oh - I just used the approach that @DanThomas advised in this post of his.
Installed code runner extension in VS Code, inserted the settings that @DanThomas advised in the settings file of VS Code and saved the JXA file as a .js file and then inserted debugger;
in the script, and enabled the Safari develop menu which you advised in the Youtube video of yours. And then when I hit cmd-option-N, the script launches in Safari debugger.
I can't be telling you how to do this, I just copied from @DanThomas and you.