Debug
The debug object is a collection of properties to aid in debugging and collecting environmental information in the browser's developer tools. This can be used to provide more information when reporting an issue to Relativity.
relativity.debug
Supported Surface Area of relativity.debug
data
Returns an object consisting of aggregated environmental information.
data : object
Example:
relativity.debug.data
info
Echo aggregated environmental information as a multiline warning to the browser's developer tools console. The warning is a serialized version of the object returned by relativity.debug.data.
info : void
Example:
relativity.debug.info
// Developer console now contains a multiline warning, which is a serialized version of the object returned by relativity.debug.data.
Getting your application's information into the debug information
Specific information for custom pages is currently limited to the custom page's URL. However, the custom page may supply any additional information (such as client code version) and the debug api will report this along with the rest of the debug information. You can accomplish this by adding this information in the custom page's own window at (custom page window).relativity.participant. This may be simple string information, a complicated object, or anything in between. The value will be serialized for console output as Active Application Information.
Example:
// Before changes to the Custom Page, in the main window:
relativity.debug.info;
// Echoed to console:
/*
RELATIVITY DEBUG INFORMATION
PageBase Version Name: Classic
PageBase App Version: 1.79.0 -- built 1670264195063
Outer URL: https://[RelativityUrl]/Relativity/External.aspx?AppID=25371052&ArtifactID=25371052&DirectTo=%25applicationPath%25%2fCustomPages%2f1b279f8f-d7d7-4c0a-b036-7cfd118bd963%2fDefault.aspx&SelectedTab=1532635
Active Mode: null
Active Workspace: 25371038
Active ArtifactTypeID: (None)
Active Window: aspx
Active Application: Classic External or Custom Page
Active Window URL: https://[RelativityUrl]/Relativity/CustomPages/1b279f8f-d7d7-4c0a-b036-7cfd118bd963/Default.aspx
*/
// Adding additional information to the Custom Page's window:
window.relativity = {
participant: {
name: "SomeValue",
version: "1.0.0",
buildDate: Date.now(),
},
};
// When navigated to this Application's Custom Page:
relativity.debug.info;
// Echoed to console:
/*
RELATIVITY DEBUG INFORMATION
PageBase Version Name: Classic
PageBase App Version: 1.79.0 -- built 1670264195063
Outer URL: https://[RelativityUrl]/Relativity/External.aspx?AppID=25371050&ArtifactID=25371052&DirectTo=%25applicationPath%25%2fCustomPages%2f1b279f8f-d7d7-4c0a-b036-7cfd118bd963%2fDefault.aspx&SelectedTab=1532635
Active Mode: null
Active Workspace: 25371038
Active ArtifactTypeID: (None)
Active Window: aspx
Active Application: Classic External or Custom Page
Active Window URL: https://[RelativityUrl]/Relativity/CustomPages/1b279f8f-d7d7-4c0a-b036-7cfd118bd963/Default.aspx
Active Application Information: {"name":"SomeValue","version":"1.0.0","buildDate":1670351525599}
*/