Choose Language Hide Translation Bar
Highlighted
FN
FN
Community Trekker

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.

 

 

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

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
Highlighted

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
Community Trekker

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.

0 Kudos
Highlighted

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

Highlighted
FN
FN
Community Trekker

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

 

0 Kudos
Highlighted
Jeff_Perkinson
Community Manager Community Manager

Re: Breakpoint when debugging an application (GUI)

SN-55411 may help you get the debugger working.

-Jeff
0 Kudos