Hello - quick question. Trying to learn JXA, to use the scripts from KM.
Based on some great advise here, have been able to use VS Code and Code Runner and use of debugger; statement, to attach scripts to Safari debugger.
However, as silly as it sounds, I have not been able to figure out how to stop the execution once attached to Safari debugger - it seems the script execution has to be completed to remove it from the Safari develop menu.
There has got to be a way to stop the script, make a modification, and launch again in the debugger... Thanks!
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.
I know I am "late for the party", but I am just starting to look at JXA, VSCode, and Web Inspector. The advice from @JMichaelTX and @DanThomas has been extremely helpful. To @sims, I believe the correct keyboard shortcut to Run Script in the Code Runner extension is Ctrl-Option-N (not Cmd-Option-N). Keep up the good work, all of you.