The debugger should step to the next script
Categories
(DevTools :: Debugger, enhancement, P3)
Tracking
(firefox75 fixed)
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: ffp74, Assigned: wartmanm)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
Steps to reproduce:
tried to debug simplest page
index:php
<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="style.css" />
<script> console.log("11"); </script>
<script src='test.js'> </script>
</head>
<body>
nya!
</body>
</html>
script.js = console.log("22)";
Actual results:
after i set breakpoint on line " <script> console.log("11"); </script>"
next step is finished debugging
Expected results:
i expected that next step in debugger will be console.log("22)"; that is in "test.js"
but he that just finished loading page
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Thanks for the report!
I can reproduce this issue on my machine using the following STR:
- Open the Debugger
- Load http://janodvarko.cz/tests/bugzilla/1548469/
- Select (index) file
- Create breakpoint at line 8
- Refresh the page, break on line 8
ER:
It should be possible to step over to line 9, 10, 12, 13, 14 and first line in test.js
AR:
Stepping over from line 10 resumes the debugger.
Honza
Comment 2•6 years ago
|
||
@Logan: is this related to known issues with inline scripts?
Honza
Comment 3•6 years ago
|
||
No this isn't related to the inline script work I've been doing. Each <script> on a page is totally independent and we have no way to know, when you step off the end of one script, that there is something else to run.
To handle this, we'd need to treat stepping off the end of a script the same as if you were hitting the pause button when unpaused, so the debugger would just pause at whatever code happens to run next. That means that if you step off the end and there is another <script> you'd pause there next, but if you step off the end and there isn't another script, you'd just pause at whatever JS happens to run next.
I don't think that'd be unreasonable, since it's not exactly a common case anyway, and wouldn't interfere with any existing logic as far as I know.
Comment 4•6 years ago
|
||
Thanks for the explanation!
Also note that this works in Chrome.
Honza
![]() |
||
Updated•6 years ago
|
![]() |
||
Updated•6 years ago
|
Updated•6 years ago
|
![]() |
||
Comment 9•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a21fe5d34833
https://hg.mozilla.org/mozilla-central/rev/5a293e35c904
Description
•