Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi Guys,

I have been looking for an easy way to debug CF's, and stumbled upon CF Explorer, but that was developed for FMv7 and hasn't been updated afaik. The original website isn't there any more.

Are there any tools/plugins that can be used to debug CF's? Similar to the standard debugger?

 

Thanks!

You are correct about the file not having been upgraded to FileMaker Pro 12 +, however it still works for a lot of the Custom Functions being posted there, and the site is still there,  FM Functions. The owner has taken it down a couple of times because of lack of activity. i.e. the more that use it, the more likely it will not stop being a resource.

There are other ways of testing.

I use the Data Viewer, and testing files.

Edited by Lee Smith
added a few more comments about the site.

  • Author

How would you use the data viewer to debug CF's? You can't step through the various commands using the data viewer that I know.

What I do at the moment is use a result var in the CF and add data from variables that I use in the CF as the CF progresses so that I have an idea how data is manipulated or handled. I then populate a Global var with the CF result var as one of the last actions in the CF. That works, but is a little convoluted to setup.

For instance I have the following CF:

/* GetKeyValue( keylist; key; separator )
   keylist   = list of keys and values separated by "separator".
   key       = key to look for and to return the value of.
   separator = the character that separates the key from the value. Usually "=" but can be anything.

   result in the CF is used to capture debugging information. If the global variable $$Debug is true, then "result" will be copied into $$DebugResult.
 */

If( Position( keylist; key & separator; 1; 1 );
    Let([
         result   = "Passed parameters:¶keylist: \"" & keylist & "\"¶key: \"" & key & "\"¶separator: \"" & separator & "\"¶";
         key      = Lower( ";" & key );
         keylist  = ";" & keylist & ";";
         result   = result & "¶key: \"" & key & "\"¶keylist: \"" & keylist & "\"";
         pos      = Position( Lower( keylist ); key & separator; 1; 1);
         keyvalue = Right( keylist; Length( keylist) - Pos );
         result   = result & "¶position of \";\" leading the key: \"" & pos & "\"¶keyvalue: \"" & keyvalue & "\"";
         pos      = Position( keyvalue; ";"; 1; 1);
         keyvalue = If( Pos; Left( keyvalue; Pos - 1 ); keyvalue);
         result   = result & "¶position of \";\" following the value: \"" & pos & "\"¶keyvalue: \"" & keyvalue & "\"";
         pos      = Position( keyvalue; separator; 1; 1);
         value    = Right( keyvalue; Length( keyvalue) - Pos );
         result   = result & "¶value: \"" & value & "\"";

         $$DebugResult = If( $$Debug; result; "" )
        ];
        If( not IsEmpty( value ); value; "" )
        )
    )

I call that CF with a ";" delimited list of keywords/values like "var1=value1;var2=value2;var3=value3" and use the CF to extract the value of the key I'm after.

The Global var ends up with the following content:

Passed parameters:
keylist: "var1=value1;var2=value2;var3=value3"
key: "var2"
separator: "="

key: ";var2"
keylist: ";var1=value1;var2=value2;var3=value3;"
position of ";" leading the key: "13"
keyvalue: "var2=value2;var3=value3;"
position of ";" following the value: "12"
keyvalue: "var2=value2"
value: "value2"

But I don't like the added complexity of all the result lines and was hoping someone would have a better idea.

Edited by OlgerDiekstra
correction

I don't think I've had a big need for that level of debugging.  If it is not a recursive CF then you can just use the data viewer to simulate it and tweak it so that it works correctly, then put it in a CF.

Recursive CFs are more difficulat since you can not simulate those in the data viewer.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.