setDebugMode

void session.setDebugMode ( boolean debugMode )

Description

Sets the debug state for the scrape. Enabled debug mode simply outputs a warning periodically while running, to help prevent running a production scrape in debug mode.

Parameters

  • debugMode True to enable debug mode, false to disable it.

Return Value

This method returns void.

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");
 }