debugger icon indicating copy to clipboard operation
debugger copied to clipboard

[tracking] Worker Debugging

Open jasonLaster opened this issue 7 years ago • 4 comments

Server-side meta bug: 1520698.

Todos

  • [x] refreshing clears selected source #7708
  • [ ] [Workers] Use one tree instead of one tree per thread #8005
  • [x] remove sources when a worker is removed #7660

jasonLaster avatar Jan 10 '19 22:01 jasonLaster

1. refreshing clears selected source
  1. go to http://firefox-dev.tools/debugger-examples/examples/todomvc/
  2. open the debugger and select todo-view
  3. refresh --> notice how todo-view is missing
2. pausing early on fails to properly resume
  1. go to http://localhost:8000/?react_perf&firefox-tab=child1/frameTarget1
  2. open the debugger and select firefox/events.js
  3. add a breakpoint on line 116 in newSource
  4. refresh --> notice how the debugger icon is green, but we don't have a call stack

With the second bug, i was able to "fix" the problem by flagging off workers in the client and changing isWorker

diff --git a/devtools/client/debugger/new/src/client/firefox/commands.js b/devtools/client/debugger/new/src/client/firefox/commands.js
index 9633efd63d94..c050403c25cf 100644
--- a/devtools/client/debugger/new/src/client/firefox/commands.js
+++ b/devtools/client/debugger/new/src/client/firefox/commands.js
@@ -417,7 +417,7 @@ async function fetchSources(): Promise<any[]> {
 }

 async function fetchWorkers(): Promise<Worker[]> {
-  if (features.windowlessWorkers) {
+  if (false && features.windowlessWorkers) {
     workerClients = await updateWorkerClients({
       tabTarget,
       debuggerClient,
diff --git a/devtools/client/debugger/new/src/utils/workers.js b/devtools/client/debugger/new/src/utils/workers.js
index b31801bc9085..60f0d90e5c0f 100644
--- a/devtools/client/debugger/new/src/utils/workers.js
+++ b/devtools/client/debugger/new/src/utils/workers.js
@@ -12,5 +12,5 @@ export function getDisplayName(thread: Thread) {
 }

 export function isWorker(thread: Thread) {
-  return thread.actor.includes("workerTarget");
+  return false; // thread.actor.includes("workerTarget");
 }

jasonLaster avatar Jan 10 '19 23:01 jasonLaster

@jasonLaster for the first issue, are you refereshing the todomvc page? or the debugger? If I refresh the todomvc page the the todo-view is still selected. If I refresh the debugger all tabs are closed. <- is this what you meant?

WenInCode avatar Jan 15 '19 04:01 WenInCode

@WenInCode i think dbg.features.windowlessDebuggers has to be true for it to regress

jasonLaster avatar Jan 15 '19 04:01 jasonLaster

Firefox Developer Tools (including Debugger tool) development is entirely happening in Bugzilla and new issues should be reported here: https://bugzilla.mozilla.org/enter_bug.cgi?product=DevTools&component=Debugger

Honza

janodvarko avatar Feb 25 '21 09:02 janodvarko