开云体育

Locked Re: Jython script debugging in JMRI


 

If you open a Script Output window _and_ have the Console window open (from Help menu), Jython should give somewhat-useful error messages in many cases. Some go to one, others to the other, so you need both.

macOS users have BBEdit and similar tools that do some syntax checking and assistance. I don’t know of similar smart editors for Window, but I’m sure they exist.

Bob

On Aug 20, 2018, at 8:46 AM, JerryG via Groups.Io <jerryg2003@...> wrote:

The community is very helpful in providing example Jython scripts to do a variety of useful functions. Of course, all scripts need to be modified for local circumstances and that is where I start to have a problem. Is there any capability within JMRI to help me in debugging my scripts? I’m just learning Jython and it seems that every time I make a minor change, something breaks and the script just hangs. I’m using Notepad++ for editing and sometimes even find that my indentation gets changed when I load a script into the JMRI script entry window. Eventually, I trace these problems back to a misspelled variable or method name or a forgotten type conversion or some other equally “obvious” problem, but it sure would be helpful to have a tool for doing syntax (and perhaps some semantic) checking for JMRI scripts. I know there are dozens of tools out there, but is there a commonly used “simple” one, perhaps like there is In the Arduino IDE? Any suggestions would be appreciated.
--
Bob Jacobsen
rgj1927@...

Join [email protected] to automatically receive all group messages.