2011-04-27 Yury Semikhatsky <yurys@chromium.org>
authoryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Apr 2011 10:00:47 +0000 (10:00 +0000)
committeryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Apr 2011 10:00:47 +0000 (10:00 +0000)
        Reviewed by Pavel Feldman.

        Web Inspector: expose exception details when script is paused on exception
        https://bugs.webkit.org/show_bug.cgi?id=59591

        When script is paused on an exception, the exception value is added as <exception>
        property in the local scope and the breakpoint details message says
        "Paused on excepion: '<exception to strin value>'."

        * English.lproj/localizedStrings.js:
        * inspector/front-end/ScopeChainSidebarPane.js:
        (WebInspector.ScopeChainSidebarPane.prototype.update):
        * inspector/front-end/ScriptsPanel.js:
        (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation):
        (WebInspector.ScriptsPanel.prototype._debuggerPaused):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@85042 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/English.lproj/localizedStrings.js
Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js
Source/WebCore/inspector/front-end/ScriptsPanel.js

index 0a32121..ed320ef 100644 (file)
@@ -1,3 +1,21 @@
+2011-04-27  Yury Semikhatsky  <yurys@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: expose exception details when script is paused on exception
+        https://bugs.webkit.org/show_bug.cgi?id=59591
+
+        When script is paused on an exception, the exception value is added as <exception>
+        property in the local scope and the breakpoint details message says
+        "Paused on excepion: '<exception to strin value>'."
+
+        * English.lproj/localizedStrings.js:
+        * inspector/front-end/ScopeChainSidebarPane.js:
+        (WebInspector.ScopeChainSidebarPane.prototype.update):
+        * inspector/front-end/ScriptsPanel.js:
+        (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation):
+        (WebInspector.ScriptsPanel.prototype._debuggerPaused):
+
 2011-04-26  Yury Semikhatsky  <yurys@chromium.org>
 
         Reviewed by Pavel Feldman.
index e37c1c1..efd0f46 100644 (file)
Binary files a/Source/WebCore/English.lproj/localizedStrings.js and b/Source/WebCore/English.lproj/localizedStrings.js differ
index b7f0dad..c79262a 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2011 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -73,6 +74,13 @@ WebInspector.ScopeChainSidebarPane.prototype = {
                     subtitle = null;
                     if (scope.this)
                         extraProperties = [ new WebInspector.RemoteObjectProperty("this", WebInspector.RemoteObject.fromPayload(scope.this)) ];
+                    if (i == 0) {
+                        var exception = WebInspector.debuggerModel.debuggerPausedDetails.exception;
+                        if (exception) {
+                            extraProperties = extraProperties || [];
+                            extraProperties.push(new WebInspector.RemoteObjectProperty("<exception>", WebInspector.RemoteObject.fromPayload(exception)));
+                        }
+                    }
                     break;
                 case "closure":
                     title = WebInspector.UIString("Closure");
index c170cde..b5a4d92 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2011 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -412,6 +413,12 @@ WebInspector.ScriptsPanel.prototype = {
         } else {
             function didGetSourceLocation(sourceFileId, lineNumber)
             {
+                var exception = WebInspector.debuggerModel.debuggerPausedDetails.exception;
+                if (exception) {
+                    this.sidebarPanes.callstack.setStatus(WebInspector.UIString("Paused on exception: '%s'.", exception.description));
+                    return;
+                }
+
                 if (!sourceFileId || !this._presentationModel.findBreakpoint(sourceFileId, lineNumber))
                     return;
                 this.sidebarPanes.jsBreakpoints.highlightBreakpoint(sourceFileId, lineNumber);