You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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)
The text was updated successfully, but these errors were encountered: