If I place a breakpoint for debugging in the code of a button on a form which appears in a modal dialogue, the breakpoint does not trigger in Eclipse. Smart client simply actions the code. This behaviour limits my debugging of code within modal dialogues.
Breakpoints in normal forms trigger Eclipse OK, and the usual debug format appears.
Has anyone else experienced this feature? Is there a useful workaround?
I noticed something similar today but with code running in a module.
When I activate the module as the main solution and run it the breakpoint works fine (in the modal dialog) but when I use this module in another solution/module then it doesn’t break on this breakpoint.
Interesting behaviour, Robert – and a potential clue.
Thanks Joas for reminding me to state my development platform:
Eclipse Platform 3.3.3.r33x_r20080129-…
Eclipse Development Tools 3.3.2.r33x_r20080129-…
Servoy Eclipse 4.1.3.672 [Taken from ‘Product Configuration’ Servoy Feature, listed under Help|Software Updates|Manage Configuration]
Mac OS X 10.5.7
Code to call the modal dialogue:
At the end of code associated with a ‘search’ button on a main search record form I call up a modal dialog as follows:
Of course, execution stops once the form is displayed. My breakpoint comes near the beginning of code associated with a button on the dialog form:
function btn_cancel()
{
//set a global to the text of the button pressed
globals.dialog_buttonPressed = elements.btn_cancel.text
globals.ok_to_close_dialog = 1
The breakpoint is on the line beginning globals.dialog_buttonPressed…
I have tried breakpoints on other lines in code associated with this button; and with other buttons on modal dialog forms, but none trigger the debugger. In contrast, any breakpoint in code associated with non-modal dialog situations seems to trigger the debugger: this is expected behaviour.
Further testing has shown that a breakpoint in code associated with a normal form is not activated when the initial code runs within a modal dialog window.
For example, if I have a button ‘Cancel’ in the modal dialog window, and its code calls btn_yell() on another form, the debugger does not stop at a breakpoint in function btn_yell() when button ‘Cancel’ is pressed. Eclipse ignores all breakpoints and executes the code to completion.
However, if I press a button associated with btn_yell() on the other form (not in modal dialog form), then the debugger stops at the breakpoint.