Subscribe Bookmark RSS Feed

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

aallman

Contributor

Joined:

Feb 28, 2017

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.

1 ACCEPTED SOLUTION

Accepted Solutions
melaniedrake

Staff

Joined:

May 30, 2014

Solution

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.

1 REPLY
melaniedrake

Staff

Joined:

May 30, 2014

Solution

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.