facebook/hhvm — pull request #3706 by jlreyes (2014-09-09 03:18:43+00:00)
Title: Xdebug cleanup and trivial features

This PR performs cleanup and finishes all the the trivial features (the ones not discussed in #3704).

Additions:
* Implemented `xdebug_break()` function
* This is similar to `hphpd_break()`, except for xdebug. Call this to cause a breakpoint
* Implemented `xdebug_disable()`, `xdebug_enable()`, and `xdebug_is_enabled()`.
* These just manipulate the `DefaultEnable` ini setting underneath
* Implemented `xdebug_get_stack_depth()`
* Implemented `force_error_reporting` ini setting
* This is a bitmask that will be ORed with the error reporting level to produce the final error reporting level
* Implemented by creating corresponding hhvm runtime option `Log.ForceErrorReportingLevel`
* Implemented `halt_level` ini setting
* This is a bitmask of error constants. The corresponding errors will be upgraded to `E_USER_ERROR` when encountered
* Implemented by creating corresponding hhvm runtime option `ErrorHandling.UpgradeLevel`
* Implemented `scream` ini setting
* This turns off the silencer and is the same as the `NoSilencer` hdf setting
* Implemented `max_nesting_level` ini setting
* This sets the maximum allowed stack depth. This implicitly turns on the xdebug profiler when enabled and is disabled by default

Bug Fixes:
* the profiler will now be started if certain ini settings are enabled
* The default profiler line number is now 1, matching php5 debug
* Remote debugging "jit" mode now starts on errors, not just exceptions
* Exception breakpoints break on errors as well exceptions
* Changed calls to `getenv()` to `ExecutionContext::getenv()`

Misc:
* Added TODOs for each unimplemented feature. Includes brief description of what needs to be done and a reference the newly created github issue (#3704)
* Added tests
* Various cleanup