Applied javascript_debugging_WIP_v.0.1.diff by Yves.