Copy link to clipboard
Copied
Dear all,
For real debugging the breakpont mechanism is not helpfull in many cases:
Therefore I have used a mechanism logging each entrance into a function (and the leave) and Alert/Console statements in the code.
Stopping at a breakpoint and tip toeing through the following code would of course be a more elegant method, especially with the Data Browser open.
It's my impression that the ES engine in FM does not know about the breakpoints set in ESTK.
Are my expectations to breakpoints wrong or is it just this way?
Hi Klaus,
when you start a script via FrameMaker, the ESTK isn't involved any longer.
To stop at certain points you can use alerts.
But there is a way to use breakpoints without starting the script in debugging mode from ESTK. I have to admit that I didn't test it yet.
Have a look at Javascript Tools Guide page 218 :
...
Dollar ($) object functions
bp()
$.bp ([condition])
Executes a breakpoint at the current position.
condition: Optional. A string containing a JavaScript statement to be used as a
cond
Copy link to clipboard
Copied
Hi Klaus,
when you start a script via FrameMaker, the ESTK isn't involved any longer.
To stop at certain points you can use alerts.
But there is a way to use breakpoints without starting the script in debugging mode from ESTK. I have to admit that I didn't test it yet.
Have a look at Javascript Tools Guide page 218 :
Dollar ($) object functions
bp()
$.bp ([condition])
Executes a breakpoint at the current position.
condition: Optional. A string containing a JavaScript statement to be used as a
condition. If the statement evaluates to true or nonzero when this point is reached,
execution stops.
If no condition is needed, it is recommended that you use the JavaScript debugger
statement in the script, rather than this method.
It doesn't look very comfortable, but it should work.
Copy link to clipboard
Copied
Thank You Klaus, for Your clarification!
I also thought of this:
Rather than start the script via the menu in FM - and loosing the breakpoint function:
// Here are the global definitions
...
// OpenHelpFile(); // 01_menu = Documentation
// FMbiblioCollect(); // 02_menu = 1 Collect temp. citations
// FMbiblioCallBibapp(); // 03_menu = 2 Call biblio application
FMbiblioResolve(); // 04_menu = 3a Resolve temp. citations
// FMbiblioExpand(); // 05_menu = 3b Expand temp. citations in footnotes...
// Herafter the function section begins
I remember that about a year ago I used this method - but then again forgot about it.