cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
aallman
Level III

My script won't run through debugger but will run without debugger

Hello!

 

I have a script that I can get to work perfectly fine if I just use the "Run Script" button in the script window but if I open the debugger and use the "Run" button I get an error message.

 

The message says "Subscripting a list with one element list or matrix "flag" is now a list not a scalar.

 

The line of the script it is refering to is in bold below: 

 

 

	flag = loc(-5<=CalcMassesFromPeak<=5);

    //	Show(flag);

		y= NRow(flag);
		WellLookup = ESIOligoInfo["WellIDs"];
		if(y!=0,FlaggedWells = WellLookup[flag],FlaggedWells = "");
		



I don't think there is anything wrong with the script because it runs fine when I don't use the debugger. I just don't know what is going on!

 

I attached the whole script in case it helps.

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: My script won't run through debugger but will run without debugger

I think this is from two updates made to 13.0. Stolen from the New Features:

 

  • In the JSL Debugger preferences, Break for Compatibility Warnings is a new option that
    stops executing the script when a potential JSL compatibility issue is found. The Debugger
    stops only once for each potential problem in the script when the option is on. If there are
    many occurrences in the script, and you determine that they are not a problem, you can
    turn the option off. The preference is selected by default.
  • When you use a 1x1 matrix as a subscript into a matrix or list, now the result is a matrix or
    a list instead of a scalar number.

 

The debugger is telling you that you're using something that might give you a matrix or list result instead of a scalar result. You can turn the warning off in preferences. But I would make sure first that your script can deal with the change in behavior from 12 to 13.

View solution in original post

Craige_Hales
Super User

Re: My script won't run through debugger but will run without debugger

Preference dialogPreference dialog

The compatibility issue that usually trips this for me is illustrated above; at one time subscripting [42] with 1::1 (an array of elements from 1 to 1) would return 42. Now it returns [42]. The original thought was the scalar value was the common case, but being consistent for all 1::N is better because there is no special case for N==1.

This makes the debugger pause, making debugging painful. Change the preference! It probably works the way you expect it to now.This makes the debugger pause, making debugging painful. Change the preference! It probably works the way you expect it to now.

Craige

View solution in original post

3 REPLIES 3

Re: My script won't run through debugger but will run without debugger

I think this is from two updates made to 13.0. Stolen from the New Features:

 

  • In the JSL Debugger preferences, Break for Compatibility Warnings is a new option that
    stops executing the script when a potential JSL compatibility issue is found. The Debugger
    stops only once for each potential problem in the script when the option is on. If there are
    many occurrences in the script, and you determine that they are not a problem, you can
    turn the option off. The preference is selected by default.
  • When you use a 1x1 matrix as a subscript into a matrix or list, now the result is a matrix or
    a list instead of a scalar number.

 

The debugger is telling you that you're using something that might give you a matrix or list result instead of a scalar result. You can turn the warning off in preferences. But I would make sure first that your script can deal with the change in behavior from 12 to 13.

Judah
Level II

Re: My script won't run through debugger but will run without debugger

@Melanie_J_Drake

I realize that this is from years ago, but I came across this when I was trying to look for info for the same issue.  You said that the warning can be turned off.  I don't see how to do this in JMP 16.  Do you know if this is still available?

 

Thank you!

Craige_Hales
Super User

Re: My script won't run through debugger but will run without debugger

Preference dialogPreference dialog

The compatibility issue that usually trips this for me is illustrated above; at one time subscripting [42] with 1::1 (an array of elements from 1 to 1) would return 42. Now it returns [42]. The original thought was the scalar value was the common case, but being consistent for all 1::N is better because there is no special case for N==1.

This makes the debugger pause, making debugging painful. Change the preference! It probably works the way you expect it to now.This makes the debugger pause, making debugging painful. Change the preference! It probably works the way you expect it to now.

Craige