Another trick for Python Debugging:
Instead of
Python Submit("\[
Lorem ipsum dolor sit ametERROR IS HERE, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
]\")
split the code off by including it as a package:
Python Submit("
import loremIpsum as li
li()
");
Then you can import the same package in parallel into a pythonText.py file and check if all the functions run as expected.
Then JSL debugging can be reduced to the interface part.
Additional benefit:
You can edit the code of the loremIpsum package in your preferred Python text editor with syntax highlighting and other gimmicks.