BookmarkSubscribe
Choose Language Hide Translation Bar
Highlighted
awoj
Occasional Contributor

Can the JSL debugger step into nested functions or scripts?

I set breakpoints at my nested functions or scripts, but "step into" seems to do nothing.

0 Kudos
4 REPLIES 4
gzmorgan0
Super User

Re: Can the JSL debugger step into nested functions or scripts?

@awoj,

 

You did not mention which version of JMP you are using nor provide an example script.

 

Below is an example script written for chapter 11 of  JSL Companion Applications of the JMP Scripting Language, 2nd Edition. It uses an Include() for a custom list function. I can set breaks  at lines 19 and 20 where the function is called and the JMP debugger steps into that included file, I can watch the local variable values, set break points etc. This is a simple example and it was tested on JMP 12, 13 and 14.

 

Note, nothing happens at the Include() statement, but at the location where the function is called.

 

 

Names Default to Here(1);
Delete Symbols();

Include( "$JSL_Companion/11_LCombine_Func.jsl" );

// usage
//--- example #1 --- numeric list arguments
l1 = {1, 2, 3, 4, 5, 3, 5,7};
l2 = {2, 3, 4, 6, 7, 8};
xx=LCombine(l1, l2, "union");
yy=LCombine(l1, l2, "intersect");
show(xx,yy);

You will need to provide more details if you need more help.

The included script file is attached.

 

awoj
Occasional Contributor

Re: Can the JSL debugger step into nested functions or scripts?

Thanks for the response. I'm using JMP14 and below is a simple example where a nested script cannot be stepped into. The debugger does not wait for user input (clicking the script) and simply terminates execution when it reaches line 3. How can one debug such a scenario as a continuous workflow?

 

dt = New Table( "Test", New Column( "Value", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 33, 239, 3, 4] ) ) );

dt << New Script( "Dummy Script",
	For( i = 1, i <= NRows( dt ), i++,
		If( dt:Value[i] < 50,
			Show("Pass"),
			Show("Fail");
		);
	);
);

 

0 Kudos
gzmorgan0
Super User

Re: Can the JSL debugger step into nested functions or scripts?

@awoj,

I assume you know how to set a break when you run the debugger and the issue is confusion about your script.

 

Note running or debugging the script you provided does not run the simple script "Dummy Script". Below is a screen shot of a modification of your script. Your script simply writes a text string, granted valid JSL code, the the data table, but  your script does not run it.  As the screenshot displays, add the JSL syntax to run the table script "Dummy Script" and set a break points accordingly. See the Globals and Log tabs. The screenshot displays the 2nd pass through the For loop, that is i=1.

 

Hope that helps clears up your confusion. 

 

image.png  

0 Kudos
awoj
Occasional Contributor

Re: Can the JSL debugger step into nested functions or scripts?

I guess the simple answer is "no" then.

 

In my case, the user inspects/manipulates the contents of dt before running the dummy script. I cannot force it to execute before the user is done.

 

Hopefully JMP can include more standard debugger threading features in the future.

0 Kudos