cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
hogi
Level XII

Debugging Jmp applications

Are there some tricks how to debug a Jmp application?

 

I guess the defailt way to do so is something like:

Use the Jmp debugger, add breakpoints, let the application code run and stop at the breakpoint, then check what is happening step by step ...

 

When I have to debug non-Application JSL code, I like it to have the freedom to run whatever code in the script at any time.

E.g. remove the modal setting of a report window, create the report window and then run some lines of code which are at another position in the jsl file.

 

Is this also possible with applications from Application Builder?

 

1) How to enable the Embedded log in Application Builder?

hogi_0-1700239488670.png

 

2)  For debugging manually generated Applications, I found

myApp = JMP App();
(myApp << Get Namespace) << Show Contents;

When running an application from Application Builder I don't have a handle myApp which I can use to talk to the app.

Is there some command to get the namespace of the current app and "infiltrate" the code:

((current report() << get App() ) << get Namespace()) << include Namespace in HERE

such that I can copy code snippets from the app and run them directly in a script window - with direct access to the Namespace of the running App?

 

3) If I make errors in my JSL code, JSL edotor will warn me or show an error message which helps me to find the error and to correct it.

If I open the source script of an Application and make a tiny error, Jmp will crash when I run the code with << edit or << run 

Any chance to change the source code with less punishment for my penalty points? Is there a pre-check routine which I can use before I dare to run the script?

3 REPLIES 3
hogi
Level XII

Re: Debugging Jmp applications

Actually the same for included scripts - is there a possibility to manually execute code in the included script - with access to the HERE Namespace of the main script?

 

main script:

Names Default to HERE(1);
::myNamespace = localHERE(); //*)
temp =5;
include ("script_inc.jsl");

included script:

///////////////////////////
// to be able to manually execute code in this file, which accesses variables of the main file, 
// you need direct access to the namespace of the main file. To get this access, execute:  
///////////////////////////
access Namespace(::myNamespace) // *)

Show(temp);

*) (obviously) this doesn't work

hogi
Level XII

Re: Debugging Jmp applications

hogi
Level XII

Re: Debugging Jmp applications

This screen capture shows the "issue" - when included in the main script, script_B knows the variables of the Here Namespace of the main script (log of the left window).
But executed separately, script_B has it's own Here namespace.

 

It is like designed:
Essential Scripting for Efficiency and Reproducibility: Do Less to Do More (2019-US-TUT-290) 

... but it makes it impossible to run single lines directly from script_B for debugging.
-> How can I link the namespaces to allow me to debug script_B .