Exeption starts debugger but no errormessage

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

Exeption starts debugger but no errormessage

Postby stefanoni » Mon Aug 16, 2010 12:38 pm

I found and changed somewhere (sorry!) an Option to force the debugger "to be opened when an Exeption occurs".

But since I changed this Option the Errormessage ist not shown in the Console-Window anymore.
So I have to copy+past+run the actual javascript-code (the line with the error) into the
Interactive Console to get the error-message.

What do I wrong ?
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: Exeption starts debugger but no errormessage

Postby jcompagner » Mon Aug 16, 2010 2:13 pm

you mean global exception break? (that the debuggers breaks in when an exception occurs?)

go to the breakpoints view and there you have Toggle global exception break (besides method entry and exit breaks) in the toolbar of the view.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Exeption starts debugger but no errormessage

Postby stefanoni » Mon Aug 16, 2010 6:46 pm

Thanke you, I found the button but still:

When I toggle the Global Exeption Break ON, the debugger jumps directly to the error-line and stops the execution (very helpful !), but the
Errormessage ist not shown somewere.

When I toggle the Global Exeption Break OFF,
- the Errormessage ist now shown as a Messagebox, so I have to click this OK button
- I can't see the errorline, so I have to switch from debug-view to the Servoy-Design view
- then I have to click the Error-Link in the Console-Window
- douring that time the execution pointer of the debuger is just going on to somewhere

What I need is:
- Global Exeption Break (stop of the execution at the errorline), plus what is the problem (Error Message)

Is this possible ?
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: Exeption starts debugger but no errormessage

Postby jcompagner » Mon Aug 16, 2010 6:48 pm

it should print that in your console anyway, you cant turn that off.
OR your debug connection isnt right (you do can debug?)

If really nothing prints in the console, then there is another option, and that is that you have a global on error method handler on the solution
That can swallow the exceptions, you should report this yourself.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Exeption starts debugger but no errormessage

Postby stefanoni » Tue Aug 17, 2010 3:35 pm

jcompagner wrote:it should print that in your console anyway, you cant turn that off.
OR your debug connection isnt right (you do can debug?)

yes debug works fine

jcompagner wrote:If really nothing prints in the console, then there is another option, and that is that you have a global on error method handler on the solution
That can swallow the exceptions, you should report this yourself.

no global on error method

this is the way it looks when i toggle GlobalExeptionBreak to OFF (scroll down to the message...)
Prtscrn_03.jpg
Prtscrn_03.jpg (444.95 KiB) Viewed 6110 times


this is the way it looks when i toggle GlobalExeptionBreak to ON
Prtscrn_02.jpg
Prtscrn_02.jpg (513.61 KiB) Viewed 6109 times



thank you for any ideas
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: Exeption starts debugger but no errormessage

Postby jcompagner » Tue Aug 17, 2010 4:19 pm

i dont know how that can happen,
i can only reproduce that when i have an onError method that does not return true..
(but then the dialog is also not shown)

if you do application.output("test"); (right before that forced error, do you see that in the output?)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Exeption starts debugger but no errormessage

Postby stefanoni » Thu Aug 19, 2010 10:11 am

jcompagner wrote:i dont know how that can happen,
i can only reproduce that when i have an onError method that does not return true..
(but then the dialog is also not shown)


same in my case

jcompagner wrote:if you do application.output("test"); (right before that forced error, do you see that in the output?)


"test" is shown in the output


I found a workarround: after the errorline is shown, I can force the error again by typing F5 (step), then the error is
shown in the output window, then I go to the running solutionwindow to "OK" the errormessage, then I do whatever ...

Many thanks for your patience !
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: Exeption starts debugger but no errormessage

Postby jcompagner » Thu Aug 19, 2010 3:39 pm

ah wait
if you break on exception then that exception is not yet shown in the console. Then you have to go on one step more yes.
(because break on exception happens earlier then the logging of that error)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Exeption starts debugger but no errormessage

Postby michel » Thu Aug 19, 2010 4:01 pm

True, it stops right BEFORE the exception occurs. And that is very neat indeed! We can check everything that leads to the (oncoming) exception in the Interactive console.
Michel van Klink
Vision Development
michel
 
Posts: 186
Joined: Mon Sep 22, 2008 10:53 am
Location: Boskoop, The Netherlands

Re: Exeption starts debugger but no errormessage

Postby stefanoni » Thu Aug 19, 2010 7:16 pm

ah yea, the stupid habits again... for 20 years my things stops after the error... scream

insted of pushing the debuger to the error, I was always clicking to the running app trying
funny things

S O R R Y
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland


Return to Eclipse Environment

Who is online

Users browsing this forum: No registered users and 5 guests

cron