Skip to content

script ids missing when breaking on an exception #12360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
devoncarew opened this issue Aug 9, 2013 · 3 comments
Closed

script ids missing when breaking on an exception #12360

devoncarew opened this issue Aug 9, 2013 · 3 comments
Assignees

Comments

@devoncarew
Copy link
Member

I'm seeing different behavior for stack frames reported from a pause event when breaking on an exception, and from log messages for that same exception. 4 stack frames are reported in the pause event, and 3 in the log message (see attached images). More importantly, the top three frames in the pause event do not provide location information. The corresponding frames do provide location info when reported in the log message. Here's a repro case:


<!DOCTYPE html>

<html>
  <head>
    <title>test</title>
  </head>
 
  <body>
    <p id="text"></p>
    <script src="packages/browser/dart.js"></script>
    <script type="application/dart">
void main() {
  print("foo");
  int.parse("bar");
  print("baz");
}
    </script>
  </body>
</html>


And the debugger wire traffic (note the scriptId == 0 parts):


<== {"method":"Debugger.paused","params":{"reason":"exception","callFrames":[
    {"location":{"lineNumber":53,"scriptId":"0","columnNumber":0},"scopeChain":[{"object":{"description":"Object","objectId":"{"injectedScriptId":1,"id":2}","className":"Object","type":"object"},"type":"local"},{"object":{"description":"[Dart Library]","objectId":"{"injectedScriptId":1,"id":3}","className":"[Dart Library]","type":"object"},"type":"global"}],"functionName":"int._native_parse@0x36924d72","this":{"type":"undefined"},"callFrameId":"{"ordinal":0,"injectedScriptId":1}"},
    {"location":{"lineNumber":48,"scriptId":"0","columnNumber":0},"scopeChain":[{"object":{"description":"Object","objectId":"{"injectedScriptId":1,"id":4}","className":"Object","type":"object"},"type":"local"},{"object":{"description":"[Dart Library]","objectId":"{"injectedScriptId":1,"id":5}","className":"[Dart Library]","type":"object"},"type":"global"}],"functionName":"int._parse@0x36924d72","this":{"type":"undefined"},"callFrameId":"{"ordinal":1,"injectedScriptId":1}"},
    {"location":{"lineNumber":58,"scriptId":"0","columnNumber":0},"scopeChain":[{"object":{"description":"Object","objectId":"{"injectedScriptId":1,"id":6}","className":"Object","type":"object"},"type":"local"},{"object":{"description":"[Dart Library]","objectId":"{"injectedScriptId":1,"id":7}","className":"[Dart Library]","type":"object"},"type":"global"}],"functionName":"int.parse","this":{"type":"undefined"},"callFrameId":"{"ordinal":2,"injectedScriptId":1}"},
    {"location":{"lineNumber":3,"scriptId":"-752","columnNumber":0},"scopeChain":[{"object":{"description":"Object","objectId":"{"injectedScriptId":1,"id":8}","className":"Object","type":"object"},"type":"local"},{"object":{"description":"[Dart Library]","objectId":"{"injectedScriptId":1,"id":9}","className":"[Dart Library]","type":"object"},"type":"global"}],"functionName":"main","this":{"type":"undefined"},"callFrameId":"{"ordinal":3,"injectedScriptId":1}"}],"hitBreakpoints":[],"data":{"description":"FormatException","objectId":"{"injectedScriptId":1,"id":1}","className":"FormatException","type":"object"}}}

<== {"method":"Debugger.resumed"}

<== {"method":"Console.messageAdded","params":{"message":{"timestamp":1.376081961582186E9,"text":"Exception: FormatException: bar","level":"error","source":"javascript","column":3,"line":54,"repeatCount":1,"type":"log","url":"dart:core-patch/integers_patch.dart","stackTrace":[
    {"lineNumber":54,"functionName":"int._native_parse","columnNumber":3,"url":"dart:core-patch/integers_patch.dart"},
    {"lineNumber":59,"functionName":"int.parse","columnNumber":59,"url":"dart:core-patch/integers_patch.dart"},
    {"lineNumber":4,"functionName":"main","columnNumber":12,"url":"http://127.0.0.1:3030/Users/devoncarew/dart/polymer_test/web/test.html"}]}}}


Attachments:
[Screen Shot 2013-08-09 at 2.06.00 PM.png](https://storage.googleapis.com/google-code-attachments/dart/issue-12360/comment-0/Screen Shot 2013-08-09 at 2.06.00 PM.png) (13.12 KB)
[Screen Shot 2013-08-09 at 2.06.16 PM.png](https://storage.googleapis.com/google-code-attachments/dart/issue-12360/comment-0/Screen Shot 2013-08-09 at 2.06.16 PM.png) (15.75 KB)

@jacob314
Copy link
Member

Added Accepted label.

@jacob314
Copy link
Member

jacob314 commented Sep 5, 2013

Sent out a DartVM change which fixes the underlying issue.
The problem was that certain patch script files did not show up in the list of Scripts for a library.

https://codereview.chromium.org/23982002

@jacob314
Copy link
Member

Added Fixed label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants