programmatically set a debugger break(point)

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

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

mboegem:
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 ):

[attachment=0]Prtscrn_01.jpg[/attachment]

is this possible ?
Regards

stefanoni:
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?

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)
}

jcompagner:
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