| Index: src/debug-debugger.js
|
| diff --git a/src/debug-debugger.js b/src/debug-debugger.js
|
| index 0b02e2102a8f9455a2e56b6cd7c8dc9648f3a8fa..34eb0f0ec51a9390a209a7f6c47bd24d1cbaaf27 100644
|
| --- a/src/debug-debugger.js
|
| +++ b/src/debug-debugger.js
|
| @@ -45,7 +45,7 @@ Debug.DebugEvent = { Break: 1,
|
| ScriptCollected: 6 };
|
|
|
| // Types of exceptions that can be broken upon.
|
| -Debug.ExceptionBreak = { All : 0,
|
| +Debug.ExceptionBreak = { Caught : 0,
|
| Uncaught: 1 };
|
|
|
| // The different types of steps.
|
| @@ -87,7 +87,27 @@ var debugger_flags = {
|
| this.value = !!value;
|
| %SetDisableBreak(!this.value);
|
| }
|
| - }
|
| + },
|
| + breakOnCaughtException: {
|
| + getValue: function() { return Debug.isBreakOnException(); },
|
| + setValue: function(value) {
|
| + if (value) {
|
| + Debug.setBreakOnException();
|
| + } else {
|
| + Debug.clearBreakOnException();
|
| + }
|
| + }
|
| + },
|
| + breakOnUncaughtException: {
|
| + getValue: function() { return Debug.isBreakOnUncaughtException(); },
|
| + setValue: function(value) {
|
| + if (value) {
|
| + Debug.setBreakOnUncaughtException();
|
| + } else {
|
| + Debug.clearBreakOnUncaughtException();
|
| + }
|
| + }
|
| + },
|
| };
|
|
|
|
|
| @@ -781,11 +801,15 @@ Debug.clearStepping = function() {
|
| }
|
|
|
| Debug.setBreakOnException = function() {
|
| - return %ChangeBreakOnException(Debug.ExceptionBreak.All, true);
|
| + return %ChangeBreakOnException(Debug.ExceptionBreak.Caught, true);
|
| };
|
|
|
| Debug.clearBreakOnException = function() {
|
| - return %ChangeBreakOnException(Debug.ExceptionBreak.All, false);
|
| + return %ChangeBreakOnException(Debug.ExceptionBreak.Caught, false);
|
| +};
|
| +
|
| +Debug.isBreakOnException = function() {
|
| + return !!%IsBreakOnException(Debug.ExceptionBreak.Caught);
|
| };
|
|
|
| Debug.setBreakOnUncaughtException = function() {
|
| @@ -796,6 +820,10 @@ Debug.clearBreakOnUncaughtException = function() {
|
| return %ChangeBreakOnException(Debug.ExceptionBreak.Uncaught, false);
|
| };
|
|
|
| +Debug.isBreakOnUncaughtException = function() {
|
| + return !!%IsBreakOnException(Debug.ExceptionBreak.Uncaught);
|
| +};
|
| +
|
| Debug.showBreakPoints = function(f, full) {
|
| if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
|
| var source = full ? this.scriptSource(f) : this.source(f);
|
|
|