programmatically set a debugger break(point)

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

programmatically set a debugger break(point)

Postby stefanoni » Mon Sep 06, 2010 5:51 pm

Sometimes I like to break into the debugger without manualy (but programmatically) set a breakpoint. Is this possible ?

I am searching for someting like a SET BREAK ON - Statment or call a breakInToDebugger().

If there is nothing:
What do you think about the possibility to force the break with a known exeption ( var a = notExistingVar )

Thanke you for help
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: programmatically set a debugger break(point)

Postby mboegem » Mon Sep 06, 2010 6:07 pm

this is already possible.
You have to set the manual breakpoint, then take a look at the contextual menu (rightclick) of this breakpoint.
You should be able to set a condition for it.

Hope this helps
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1751
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: programmatically set a debugger break(point)

Postby stefanoni » Tue Sep 07, 2010 9:39 am

mboegem wrote:this is already possible.
You have to set the manual breakpoint, then take a look at the contextual menu (rightclick) of this breakpoint.
You should be able to set a condition for it.


I dont want to set a condition, because this ist stored somewhere else (not in the .js sourcecode).

I am looking for something like this (but maybe more official ):

Prtscrn_01.jpg
Prtscrn_01.jpg (281.88 KiB) Viewed 4895 times


is this possible ?
Regards
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: programmatically set a debugger break(point)

Postby mboegem » Tue Sep 07, 2010 11:42 am

stefanoni wrote:I dont want to set a condition, because this ist stored somewhere else (not in the .js sourcecode).


I understand.
Still breakpoints are available cross session. You're also able to export/import breakpoints and/or define breakpoints as a working set.
Although not the most convenient solution, this could be workable even in multi-dev environment.

Real programmatically there's no option yet. (as far as I know)
Maybe file a feature request?
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1751
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: programmatically set a debugger break(point)

Postby jcompagner » Tue Sep 07, 2010 3:38 pm

breakpoints in code??
in your client code?
so you mix debugging and actual code through each other?
thats horrible if you ask me.. what happens if that code ends up in a normal client??

breakpoints are something of your IDE not the actual application, why do you really want to tie it into the js code?
Breakpoints are already tied to your js code, because they know where the are..
If you want to persist breakpoints you can export (and import) them.

you can make conditional breakpoints as patrick describes or do that quickly in the code (i also do that some times in javacode in loops)

if (x == y)
{
dummy code (loggin statement with a breakpoint)
}
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: programmatically set a debugger break(point)

Postby stefanoni » Wed Sep 08, 2010 8:57 am

jcompagner wrote:breakpoints in code??
in your client code?
so you mix debugging and actual code through each other?
thats horrible if you ask me.. what happens if that code ends up in a normal client??
}


Of course, it always will be protected with a statement if (application.isInDeveloper()) !

This is very practicaly for example in the default: of a switch, when the busineslogic fails.
I just have to force the situation and i immediately jump to the right place in code where it happens.

I have to convert Thousands of VFP-Codelines to Servoy and that makes me looking for a simmilar
way to migrate the existing Foxpro-code (and it is currently not a horrible one :wink: ).

Thanke you
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 11 guests