no Interactive Console when syntax-error

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

no Interactive Console when syntax-error

Postby stefanoni » Sat Oct 22, 2011 9:37 am

How can I make the Debugger showing me an "aktiv" Interactive Console and an "aktiv" variables
-window douring the first appear of syntax-error/exception ?
Print_Screen_01021.jpg
greyed Interactive Console, and no variables visible
Print_Screen_01021.jpg (156.48 KiB) Viewed 6008 times


The Problem, if I runn into an unexpected exception/syntax-error:

- I have to start the program again, with a Breakpoint on this "problem-line". Then try to hopefully reproduce
the same error situation.

When I got it, the debugger stops at this line. Then I can copy/paste the "problem-line" into the Interactive Console
and try with different syntax many times, as long I need, until I find the right syntax.

I don' t understand why I can force the same error in the Interactive Console with no dying session, but not at the first
appear of syntax-error/exception .

Thany you for make me understand this.
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: no Interactive Console when syntax-error

Postby jcompagner » Mon Oct 24, 2011 9:54 am

first of all i see "<terminated>" that does mean that somehow your debugger is not connected at all
Try to close the client and start it again (or at least press the launch client button again)

Secondly if you see that console output the error already happened its already done and passed. So you are not at a break at all.
For that you can enable the break on exception (see debugger/breakpoints view), but then you need to be connected to the client else debugging will not work anyway.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: no Interactive Console when syntax-error

Postby stefanoni » Tue Oct 25, 2011 10:17 am

jcompagner wrote:first of all i see "<terminated>" that does mean that somehow your debugger is not connected at all
Try to close the client and start it again (or at least press the launch client button again)

The <terminated> is just because I quit the message in the UI, before pressing printscreen. If I don't do it, it looks like "not terminated"
But still no Variables, no Interactive Console !

Print_Screen_01023.jpg
a=b is a Teststatement to force an error
Print_Screen_01023.jpg (250.23 KiB) Viewed 5967 times


jcompagner wrote:Secondly if you see that console output the error already happened its already done and passed. So you are not at a break at all.
For that you can enable the break on exception (see debugger/breakpoints view), but then you need to be connected to the client else debugging will not work anyway.


This "its already done and passed" is exactly what I meen: When I run into the error first time, I always have to "enable the break on exception" and restart the whole session again.

My question is: Why the debugger don't just
- "console output the error"
- and shows me the variables
- and the (not grayed) Interactive Console
at the first time of an error
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: no Interactive Console when syntax-error

Postby jcompagner » Tue Oct 25, 2011 10:27 am

no if you want to break on an exception you have to enable that
And that setting should be kept and saved, if that is not the case then make report a bug in our jira.
So you only should have to enable it once and then it should break from that time on even after restarts
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: no Interactive Console when syntax-error

Postby stefanoni » Tue Oct 25, 2011 11:01 am

jcompagner wrote:no if you want to break on an exception you have to enable that

This I have allready done and works fine, but whas not what I mean

jcompagner wrote:And that setting should be kept and saved, if that is not the case then make report a bug in our jira.
So you only should have to enable it once and then it should break from that time on even after restarts

I didn't say that this setting is not kept. the break works as expected

what I mean:

- press "start Debug smartclient" button
- the solution breaks because a error ( the line a=b in my Test)
- debugger is shown with the error message

then I can't see any variables and the Interactive Console is dead
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: no Interactive Console when syntax-error

Postby jcompagner » Tue Oct 25, 2011 11:27 am

I don't understand then what you are saying,
The picture you are showing me, you are not in a break anymore the debugger is not suspended (so it won't be able to show you anything)

But you are saying "the break works as expected" but where is the break then? Because the message that is shown in the console is always after the fact, if you see that then you won't be able to see any variables anymore.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: no Interactive Console when syntax-error

Postby stefanoni » Tue Oct 25, 2011 1:17 pm

Thank you for your patience !
jcompagner wrote:The picture you are showing me, you are not in a break anymore the debugger is not suspended

yes, the debugger is not suspended by a breakpoint, but suspended because of the error.

jcompagner wrote:(so it won't be able to show you anything)

Thats the point: This is the moment where I most need to know about the possible error-reasons, but the debuger
don't shows me anything.

jcompagner wrote:But you are saying "the break works as expected" but where is the break then?

The error breaks the running routine and show me the debugger-window with
- the error message
- empty variables tab
- not running Command-Console tab

jcompagner wrote:
Because the message that is shown in the console is always after the fact, if you see that then you won't be able to see any variables anymore.

Thats the point !

The Command-Console is able to:
- try to execute something
- give me the error-message
- but all Variables are still visible and the Session is still alive

The running debug prozess :
- execute something
- give me the error-message
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: no Interactive Console when syntax-error

Postby jcompagner » Tue Oct 25, 2011 1:50 pm

the command console is something completely different.
Int he command console you are just constantly directly in the script engine, there is no debug or stack variable at all (there is no current code running the only thing that runs is what you say it must do)

But i just tested your example

if i do:

var mytest = somethingthatisntthere

and i have the break on exception enabled
it will break and the debugger will suspend and i see all the variables at that time.

I don't see the message in the console yet. because that is only shown when i press the play/next line again in the debugger, at which time the debugger resumes again and all variables are gone.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: no Interactive Console when syntax-error

Postby stefanoni » Tue Oct 25, 2011 4:55 pm

In the last post I wrote "Command console" that was a mistake. I meant "Interactive Console"
Sorry for that !

jcompagner wrote:
But i just tested your example
if i do:
var mytest = somethingthatisntthere
and i have the break on exception enabled
it will break and the debugger will suspend and i see all the variables at that time.

Ok, after this statement I made a Testsolution from scratch an tried it and - wow - it's true, I see
all vars and the Interactiv Console is open for any exercises. So I check now, if my issue is depended
on my solution and/or the kind of error, or the kind of onError-handling I used.

Thank you a lot for help me to eliminate my questioning and - honesty, I trust Servoy more and more as longer I work with it :wink:
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 4 guests

cron