haikuwebkit/ManualTests/inspector/debugger-pause-during-load....

6 lines
384 B
HTML
Raw Permalink Normal View History

Makes breakpoints and debugging code during page load work in the Web Inspector's debugger. Specifically, this makes the source code for loading resources show up in the Scripts panel. https://bugs.webkit.org/show_bug.cgi?id=19053 rdar://problem/5933408 Reviewed by Mark Rowe. * WebCore.xcodeproj/project.pbxproj: Mark the inspector group as not using tabs and a tab width of 8. * inspector/InspectorController.cpp: (WebCore::addResourceSourceToFrame): Return a bool to report if the source was added successfully or not. (WebCore::addSourceToFrame): Ditto. * inspector/front-end/ScriptView.js: (WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded): Return early if the InspectorController.addSourceToFrame fails. Moved the delete of the _frameNeedsSetup property after that call so if the source wasn't added it will be attempted again. * inspector/front-end/SourceView.js: (WebInspector.SourceView.prototype.detach): Move a comment. (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded): Don't check if the resource is finished or failed, just attempt to add the source to the frame. WebCore has the source, but the finished property hasn't been set yet. Return early if the InspectorController.addSourceToFrame fails. Moved the delete of the _frameNeedsSetup property after that call so if the source wasn't added it will be attempted again. (WebInspector.SourceView.prototype._resourceLoadingFinished): Clear the _frameNeedsSetup and _sourceFrameSetup properties so the source frame will we populated again now that the resource load has finished. * manual-tests/inspector/debugger-pause-during-load.html: Added. Canonical link: https://commits.webkit.org/29569@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-10-05 04:12:40 +00:00
<script>
debugger; // You should see this code and execution line in the Scripts panel.
</script>
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=19053">Bug 19053: Source code not visible when script is paused before onload fires</a>.</p>
<p>To test, open the Inspector and start a debugging session. You should see this file and execution line in the Scripts panel.</p>