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");
}
session.setDebugMode(true);
if(session.getDebugMode())
{
session.setVariable("SEARCH_TERM", "DVDs");
session.setVariable("USERNAME", "some user");
session.setVariable("PASSWORD", "the password");
}
mikes on 11/18/2011 at 4:31 pm
- Printer-friendly version
- Login or register to post comments