Open Bug 1548469 Opened 1 year ago Updated 1 year ago

The debugger should step to the next script


(DevTools :: Debugger, enhancement, P3)

66 Branch


(Not tracked)


(Reporter: ffp74, Unassigned)


(Blocks 1 open bug)


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

<!doctype html>
<html lang="ru">
<meta charset="utf-8" />
<link rel="stylesheet" href="style.css" />
<script> console.log("11"); </script>
<script src='test.js'> </script>

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

Component: Untriaged → Debugger
Product: Firefox → DevTools

Thanks for the report!

I can reproduce this issue on my machine using the following STR:

  1. Open the Debugger
  2. Load
  3. Select (index) file
  4. Create breakpoint at line 8
  5. Refresh the page, break on line 8

It should be possible to step over to line 9, 10, 12, 13, 14 and first line in test.js

Stepping over from line 10 resumes the debugger.


Has STR: --- → yes
Ever confirmed: true
Priority: -- → P3

@Logan: is this related to known issues with inline scripts?


Flags: needinfo?(lsmyth)

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.

Flags: needinfo?(lsmyth)

Thanks for the explanation!

Also note that this works in Chrome.


Blocks: dbg-control
No longer blocks: dbg-sources
Type: defect → enhancement
Summary: debugger doesn't moving to scripts outside of the selected debugging file → The debugger should step to the next script
You need to log in before you can comment on or make changes to this bug.