cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
FN
FN
Level VI

Breakpoint when debugging an application (GUI)

How can I add a breakpoint that stops the execution within an application that has GUI?

 

For example, only when pressing a button the debugger opens and halts the program in the desired line.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Breakpoint when debugging an application (GUI)

I see now - I was assuming the generic term "application", and not the Application Builder.

 

The scripts in Application Builder cannot be run stand-alone - when you right click in the script area and choose "Run" or "Debug" it tries to execute the script by itself, without starting a JMPApp instance first.  I would suggest using the red-triangle menu to start the debugging session, which includes the necessary application startup.

View solution in original post

5 REPLIES 5

Re: Breakpoint when debugging an application (GUI)

The debugger has to be open before you can set any breakpoints.  I used one of the scripting index ButtonBox examples to demonstrate:

 

Names Default To Here( 1 );
New Window( "Example",
	Button Box( "press me", <<setFunction(
		Function( {this},
			this << setButtonName( "thanks" )
		)	
	) )
);

Click "Debug Script" from the toolbar, Edit menu, or context-click menu.  In the debugger, context-click on the line within the Button Box function to set a breakpoint, and then click "Run" from the toolbar.  The script will then run without interruption until the button is pressed.

 

ButtonDebug.png

 

FN
FN
Level VI

Re: Breakpoint when debugging an application (GUI)

Thanks, but when trying to run any application via a script, I get this error:

 

 

Name Unresolved: OnModuleLoad in access or evaluation of 'OnModuleLoad' , OnModuleLoad( {} ) /*###*/

 

FN_0-1582189306616.png

 

If you run it from the GUI editor tab (Module1), this error does not appear. Hence, I was not sure how to debug these.

Re: Breakpoint when debugging an application (GUI)

I see now - I was assuming the generic term "application", and not the Application Builder.

 

The scripts in Application Builder cannot be run stand-alone - when you right click in the script area and choose "Run" or "Debug" it tries to execute the script by itself, without starting a JMPApp instance first.  I would suggest using the red-triangle menu to start the debugging session, which includes the necessary application startup.

FN
FN
Level VI

Re: Breakpoint when debugging an application (GUI)

I was not aware of that option, thank you.

 

Unfortunately, I get this message when I click "Debug Application":

 

A time-out encountered while attempting to connect to the JSL Debugger GUI.

 

FN_0-1582208308258.png

 

Jeff_Perkinson
Community Manager Community Manager

Re: Breakpoint when debugging an application (GUI)

SN-55411 may help you get the debugger working.

-Jeff