Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7091 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I find FileMaker Developer 7's Debug Scripts both useful and frustrating. Step-by-step script execution and breakpoints are quite useful. However, having used interactive debuggers in many programming environments, I'm constantly frustrated by FileMaker's lack of two key debugging features:

  • display field values and script parameters
  • watchpoints -- breakpoints triggered by a specific condition, typically involving a field value

While waiting for FileMaker Debug Script to smarten up, I've found a couple of scripting techniques to mimic these features. The following script fragment illustrates the techniques.

If [Get ( ScriptParameter ) <> ""]

    #

End If

If []

    Show Custom Dialog [Get(ScriptParameter)]

End If

(Note: The "<>" represents a not-equal operator.)

If Debug Scripts is disabled, these script steps are invisible. The first "If" executes a comment, and the second "If" never executes the Show Custom Dialog.

Setting a breakpoint on the comment and running with Debug Scripts enabled causes the script to stop when a script parameter is passed. At that breakpoint, the Show Custom Dialog step can be selected as the next step to be executed.

Having to edit scripts is certainly tedious, but it's better than nothing.

-- Ward

Posted

Hi Ward,

Script Parameters do show in the debugger window (at the bottom with the script names,) unfortunately it only show the first line of a multi-line parameter.

Not having used other debuggers much, the watchpoint thing sounds interesting. Certainly an If[] script step could be used for this, but I'm not sure how it would be implemented within the debugger itself.

Posted

I just rushed back from a FM debugging session to correct my posting about showing script parameters, but Ender beat me to it:

Script Parameters do show in the debugger window (at the bottom with the script names,) unfortunately it only show the first line of a multi-line parameter.

I had been so discouraged about the inability to show field values that I'd overlooked FM's display of the first script parameter.

Show Custom Dialog can show several parameters (up to the limits of the fixed-size dialog layout).

-- Ward

Posted

I've found another shortcoming of FM's debugger.

During a debugging session, the Debug menu allows one to remove all breakpoints in in the active script. But there's apparently no way to remove all breakpoints in all scripts in a single operation.

I now realize why my script debugging occasionally stops in unexpected places -- it's forgotten breakpoints from an earlier session.

-- Ward

This topic is 7091 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.