{dialog.object}debugInfoToFile Method


{dialog.object}.debugInfoToFile(data, filename [, append [, silent]]);


dataAny Type

The data you want to write to the file. If the data is an Object, you must serialize it using JSON.stringify()


The fully qualified filename on the server where the data should be written


Defaults to false. If true, the data are appended to the end of an existing file


Defaults to false. If true, the confirmation message is suppressed.


Writes client-side data to a file on the server.


This method is useful when debugging an application and you want to examine some client-side data. While you can typically use Alerts in client side code to examine data, or in some case use console.log() commands (not always possible when the app is running on a mobile device), this method allows you to write client side data to a file on the server.

In cases where you do not have permission to write to server files (e.g. when running under IIS or on the Alpha Cloud), the companion {dialog.object}.debugInfoToS3() method can be used to write to a file on an S3 bucket.


var list = {dialog.object}.getControl('list1');
var data = JSON.stringify(list._data,'','\t');
var filename = 'c:\\debuginfo\\file1.txt';

See Also