Debug mode not activated with breakpoint in modal dialogue

Questions and answers regarding the use of eclipse environment as seen in Servoy Developer

Debug mode not activated with breakpoint in modal dialogue

Postby richh » Tue Jun 09, 2009 5:56 pm

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?
Richard Hinder
Chartered Engineer and priest
richh
 
Posts: 78
Joined: Sat Jan 14, 2006 8:34 pm
Location: London

Re: Debug mode not activated with breakpoint in modal dialogue

Postby Joas » Tue Jun 09, 2009 8:12 pm

It seems to work correct here.

What version of Servoy do you use? And can you show the code where the debugging fails and the code you use to you show the dialog?
Joas de Haan
Yield Software Development
Need help on your project? yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 842
Joined: Mon Mar 20, 2006 4:07 pm
Location: Leusden, NL

Re: Debug mode not activated with breakpoint in modal dialogue

Postby ROCLASI » Wed Jun 10, 2009 12:48 am

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.

Servoy 4.1.3 (Mac OS X)
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Debug mode not activated with breakpoint in modal dialogue

Postby richh » Wed Jun 10, 2009 12:38 pm

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:
Code: Select all
application.showFormInDialog(forms.frm_search_criteria_people, -1, -1, 640, 672,  'Search for people', false, false, 'Dialogue', true);

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:
Code: Select all
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.
Richard Hinder
Chartered Engineer and priest
richh
 
Posts: 78
Joined: Sat Jan 14, 2006 8:34 pm
Location: London

Re: Debug mode not activated with breakpoint in modal dialogue

Postby richh » Wed Jun 10, 2009 5:11 pm

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.
Richard Hinder
Chartered Engineer and priest
richh
 
Posts: 78
Joined: Sat Jan 14, 2006 8:34 pm
Location: London

Re: Debug mode not activated with breakpoint in modal dialogue

Postby jcompagner » Thu Jun 11, 2009 1:46 pm

this is a limitation of mac. under windows/linux this will work fine but if we allow the mac to debug a modal dialog everything would lock up.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Debug mode not activated with breakpoint in modal dialogue

Postby ROCLASI » Thu Jun 11, 2009 2:15 pm

Ah! That was it, I did change the FID to modal at some point.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Eclipse Environment

Who is online

Users browsing this forum: No registered users and 4 guests

cron