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.
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.
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.
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( {} ) /*###*/
If you run it from the GUI editor tab (Module1), this error does not appear. Hence, I was not sure how to debug these.
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.