Choose Language Hide Translation Bar
Highlighted
lwx228
Level VII

How can close the JSL debugger window with JSL?

How to automatically close the jsl debugger window with JSL after debugging the script?

 

2020-07-03_15-10.png

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: How can close the JSL debugger window with JSL?

I am not sure what you are trying to do here, but with a slight modification to your code, and using simpler formulas, the code worked fine.

I specified 3 values for Form1

:a1+:k36

:a1

:k36

I populated row one's values for columns a1 and k36 with the values

5 and 33

and ran this code

names default to here(1);
d0=data table("thed0");
dt=data table("thedt");

For( r = 1, r <= N Row( d0 ), r++,
	aaa = d0[r, "form1"];
	Eval( Parse( "Column(dt,\!"test\!")<<Formula(" || aaa || ")" ) );
	dt << run formulas;
	show(dt:test[1]);
);

and got the results in the log of:

dt:test[1] = 38;
dt:test[1] = 5;
dt:test[1] = 33

 

Jim

View solution in original post

8 REPLIES 8
Highlighted
txnelson
Super User

Re: How can close the JSL debugger window with JSL?

Click on the red square Icon

Jim
Highlighted
lwx228
Level VII

Re: How can close the JSL debugger window with JSL?

Thank Jim!

I want to use JSL to automatically exit the debug window.

2020-07-03_19-05.png

Highlighted

Re: How can close the JSL debugger window with JSL?

I do not think that is possible. Your script runs in JMP. If it launches the Debugger, then that instance of JMP is suspended and another instance of JMP starts with the Debugger. The original script is suspended. The copy of the script running in the Debugger cannot refer to the original instance of JMP.

 

The Debugger is intended to be used as an interactive tool.

Learn it once, use it forever!
Highlighted
Craige_Hales
Staff (Retired)

Re: How can close the JSL debugger window with JSL?

The copy of JMP running the debugger is controlling the JSL script running in the original copy of JMP. The running script has limited ways to communicate with the debugger, which is a separate process on the computer.

If you really need the ability, make a feature request. It would be similar to the debugbreak() function that allows the running script to tell the already-running debugger to "break".

Craige
Highlighted
lwx228
Level VII

Re: How can close the JSL debugger window with JSL?

Thanks Experts!

For( r = 1, r <= N Row( d0 ), r++,
	aaa = d0[r, "form1"];
	Current Data Table( dt );
	Eval( Parse( "Column(\!"test\!")<<Formula(" || aaa || "))" ) );
	dt << run formulas;
);

 

Highlighted
txnelson
Super User

Re: How can close the JSL debugger window with JSL?

I am not sure what you are trying to do here, but with a slight modification to your code, and using simpler formulas, the code worked fine.

I specified 3 values for Form1

:a1+:k36

:a1

:k36

I populated row one's values for columns a1 and k36 with the values

5 and 33

and ran this code

names default to here(1);
d0=data table("thed0");
dt=data table("thedt");

For( r = 1, r <= N Row( d0 ), r++,
	aaa = d0[r, "form1"];
	Eval( Parse( "Column(dt,\!"test\!")<<Formula(" || aaa || ")" ) );
	dt << run formulas;
	show(dt:test[1]);
);

and got the results in the log of:

dt:test[1] = 38;
dt:test[1] = 5;
dt:test[1] = 33

 

Jim

View solution in original post

Highlighted
lwx228
Level VII

Re: How can close the JSL debugger window with JSL?

Thank Jim!

It seems that this formula is not the source of the problem.I just tried again, and this part alone can do the calculation in my code.

Let me check it again.
Highlighted
lwx228
Level VII

Re: How can close the JSL debugger window with JSL?

Thank Jim!

 a slight modification  figured it out.

Article Labels