The behaviour of these functions is affected by settings in php.ini.
|mongodb.debug||""||PHP_INI_ALL||Only available for the PHP driver, and not the HHVM one|
Here's a short explanation of the configuration directives.
Store full activity debug log in this directory or stream. The special value "stderr" can be provided to write to STDERR.
Not available for HHVM