Closed Bug 1532362 Opened 5 years ago Closed 5 years ago

Breakpoints don't work in evaled sources

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(firefox67 fixed)

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: Harald, Assigned: bhackett1024)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Attached image image.png

STR:

ER: Breakpoint gets hit.
AR: Foo executes but nothing pauses

Debugger statement pauses as expected when clicking Bar.

No longer blocks: 1531826
Blocks: dbg-sources
Priority: -- → P2
Attached patch patchSplinter Review

The problem here is related to the '//# sourceURL=my-foo.js' in the eval'ed source, which assigns a URL to the source which the client can use. When the client wants to set a breakpoint in that source, it sends the URL down to the server, but then the server goes and compares the URL with the Debugger.Source's .url property, which is a different value ("http://whatever/script.js line 8 > eval"). I think it would make more sense to use the actor's .url property, which is almost the same as what was sent up to the client. (The source actor's form actually sends 'this.url.split(" -> ").pop()'; I don't know what this is for but hopefully it is no longer necessary.)

Assignee: nobody → bhackett1024
Attachment #9048275 - Flags: superreview?(lsmyth)
Attached patch testSplinter Review
Attachment #9048275 - Flags: superreview?(lsmyth)
Attachment #9048275 - Flags: superreview?
Attachment #9048275 - Flags: review+
Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a52dffe6d7be
Lookup sources by actor URL instead of source URL, r=lsmyth.

Backed out for perma fails on devtools/client/debugger/new/test/mochitest/browser_dbg-sourceURL-breakpoint.js.

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&resultStatus=testfailed%2Cbusted%2Cexception&selectedJob=232423781&revision=a52dffe6d7beee0a0ad9dca59ab504593018d00d

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=232423781&repo=mozilla-inbound&lineNumber=14925

14:51:51 INFO - TEST-START | devtools/client/debugger/new/test/mochitest/browser_dbg-sourceURL-breakpoint.js
14:51:55 INFO - TEST-UNEXPECTED-FAIL | devtools/client/debugger/new/test/mochitest/browser_dbg-sourceURL-breakpoint.js | Uncaught exception - at resource://devtools/client/debugger/new/src/utils/source-maps.js:86 - TypeError: mappedLocation is undefined
14:51:55 INFO - Stack trace:
14:51:55 INFO - getSelectedLocation@resource://devtools/client/debugger/new/src/utils/source-maps.js:86:52
14:51:55 INFO - getFirstBreakpointColumn@chrome://mochitests/content/browser/devtools/client/debugger/new/test/mochitest/helpers.js:744:10
14:51:55 INFO - addBreakpoint@chrome://mochitests/content/browser/devtools/client/debugger/new/test/mochitest/helpers.js:761:22
14:51:55 INFO - @chrome://mochitests/content/browser/devtools/client/debugger/new/test/mochitest/browser_dbg-sourceURL-breakpoint.js:7:9
14:51:55 INFO - Async*Tester_execTest/<@chrome://mochikit/content/browser-test.js:1106:34
14:51:55 INFO - Tester_execTest@chrome://mochikit/content/browser-test.js:1134:12
14:51:55 INFO - nextTest/<@chrome://mochikit/content/browser-test.js:995:14
14:51:55 INFO - SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:803:59
14:51:55 INFO - Leaving test bound
14:51:55 INFO - GECKO(904) | ++DOMWINDOW == 26 (0x11dfdb400) [pid = 904] [serial = 457] [outer = 0x11a4584c0]
14:51:55 INFO - GECKO(904) | console.warn: "Error while detaching the thread front: 'detach' request packet to 'server1.conn67.child1/context22' can't be sent as the connection is closed."
14:51:56 INFO - GECKO(904) | --DOMWINDOW == 25 (0x12e2b6000) [pid = 904] [serial = 450] [outer = 0x0] [url = about:blank]
14:51:56 INFO - GECKO(904) | --DOMWINDOW == 24 (0x11ee5a000) [pid = 904] [serial = 446] [outer = 0x0] [url = about:blank]
14:51:56 INFO - GECKO(904) | --DOMWINDOW == 23 (0x12e2b2c00) [pid = 904] [serial = 449] [outer = 0x0] [url = about:blank]
14:51:56 INFO - GECKO(904) | --DOMWINDOW == 22 (0x12e0e3400) [pid = 904] [serial = 447] [outer = 0x0] [url = about:devtools-toolbox]
14:51:57 INFO - GECKO(904) | [Parent 904, Main Thread] WARNING: NS_ENSURE_TRUE(!mHasOrHasHadOwnerWindow || mOwnerWindow) failed: file /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/DOMEventTargetHelper.h, line 135
14:51:57 INFO - GECKO(904) | [Parent 904, Main Thread] WARNING: NS_ENSURE_TRUE(!mHasOrHasHadOwnerWindow || mOwnerWindow) failed: file /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/DOMEventTargetHelper.h, line 135
14:51:57 INFO - GECKO(904) | [Parent 904, Main Thread] WARNING: NS_ENSURE_TRUE(!mHasOrHasHadOwnerWindow || mOwnerWindow) failed: file /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/DOMEventTargetHelper.h, line 135
14:51:57 INFO - GECKO(904) | [Parent 904, Main Thread] WARNING: NS_ENSURE_TRUE(!mHasOrHasHadOwnerWindow || mOwnerWindow) failed: file /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/DOMEventTargetHelper.h, line 135
14:51:57 INFO - Removing tab.
14:51:57 INFO - Waiting for event: 'TabClose' on [object XULElement].
14:51:57 INFO - Got event: 'TabClose' on [object XULElement].
14:51:57 INFO - Tab removed and finished closing
14:51:57 INFO - GECKO(904) | --DOMWINDOW == 21 (0x11de962e0) [pid = 904] [serial = 443] [outer = 0x0] [url = chrome://devtools/content/debugger/new/index.html]
14:51:57 INFO - GECKO(904) | --DOMWINDOW == 20 (0x11a4c7100) [pid = 904] [serial = 440] [outer = 0x0] [url = about:blank]
14:51:57 INFO - GECKO(904) | --DOCSHELL 0x1150e5000 == 8 [pid = 904] [id = {4a5c08e6-fe24-ad4c-b905-dded8ddaac6c}] [url = about:blank]
14:51:57 INFO - GECKO(904) | --DOCSHELL 0x1150c7800 == 7 [pid = 904] [id = {0a230fb4-21ef-4c4a-b9e6-cad76cf5ad0c}] [url = chrome://devtools/content/debugger/new/index.html]
14:51:57 INFO - GECKO(904) | MEMORY STAT | vsize 4530MB | residentFast 626MB | heapAllocated 144MB

Backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/da8c06756fcc409c30a986abcffd040f02b4bdff

Flags: needinfo?(bhackett1024)
Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a8c07059ab92
Lookup sources by actor URL instead of source URL, r=lsmyth.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Flags: needinfo?(bhackett1024)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: