How can you detect and fix errors elegantly when you program long and heavy JSL codes?I have a question about how do you do when you want to restart JSL code after fixing an error part. I got this question at JMP Discovery Summit Japan last week.
Do you know good practices to program a long JSL code, detect errors, and fixing them smoothly in JMP?
The original question is whether you can change a JSL code and restart it without restarting from the beginning in the JSL Debugger. Please see the folloing screen shot as an example. The error happens at the 4th line. The user wants to change this error part and restart it without running the first two line (x=1; and Show(x);).

He sometimes do very heavy process with JSL on JMP, and he doesn't want to do the same thing again from the beginning.
As far as the user and I check, there is no way to do such restarting in the JSL Debugger. We need to stop the JSL Debugger, fix it in the Script Editor, and redo all codes from the beginning.
In Jupyter Notebook and Google Colab for programming R and Python, you can separate your long code into several small parts, and you can run only problematic part in which error happens without running from the begining.
I myself put many "Throw()" function in order to see where error happens when I program a long JSL code. But it's not elegant.
I will thank you for any idea, tricks or advice.
Re: How can you detect and fix errors elegantly when you program long and heavy JSL codes?Some more serious JSL developers use VS Code. There is a JMP JSL extension for VS Code that was written by Vince Faller

Another approach is to use either functional programming or expressions. You could write your code as a sequence of expressions or as a sequence of functions. Each function or expression could just be a small section of code that you would normally just write linearly.
Re: How can you detect and fix errors elegantly when you program long and heavy JSL codes?There is also a JMP Notebook in the works, similar to Jupyter Notebook/Google Colab and with a v19 release planned. I have found that this makes scripting and debugging easier for the reason you've stated. Of course, that's a solution that is pretty far off, but it's a solution we can begin presenting soon to customers.
Re: How can you detect and fix errors elegantly when you program long and heavy JSL codes?Thank you very much for your advice.
I would like to tell the JSL extention on VS Code made by Vince Faller-san. I myself use the VS Code only when I program Julia code (a very little). But it may be also a good solution for the Japanese user to program with JSL.
I will also tell your idea, with some examples, that he should separate the whole code to small functions.
Re: How can you detect and fix errors elegantly when you program long and heavy JSL codes?Thank you very much for your advice.
I had told "JMP Notebook add-in" (JMP-Notebook) to the user. It sounds exciting to me that there is a development plan that JMP will support the "JMP Notebook" in the future release (JMP19 or later).