getDebugMode

boolean session.getDebugMode ( )

Description

Checks to see if this is currently set to run in debug mode. This is useful for developing scrapes, as enabling debug mode logs a warning message, so it is easier to notice a scrape with hard-coded values used for development. Also logs a warning in the web interface or log each time monitored variables are logged with the logMonitoredValues or webMessage methods are called.

Parameters

This method takes no parameters.

Return Value

True if debug mode is enabled, false otherwise.

Change Log

Version Description
5.5.29a Available in all editions.

Examples

Set some hardcoded values to use when the scrape is being developed

 // Comment out the line below for production
 session.setDebugMode(true);
 
 if(session.getDebugMode())
 {
   session.setVariable("SEARCH_TERM", "DVDs");
   session.setVariable("USERNAME", "some user");
   session.setVariable("PASSWORD", "the password");
 }