Commit Graph
3917 Commits
Author SHA1 Message Date
Alexandre Poirot f27b54d9d0 Bug 1835255 - [devtools] Fix browser_dbg-reducer-cleanup-on-target-removal.js intermittent. r=devtools-reviewers,nchevobbe
We were waiting for Sources, which are resources, but not the targets,
which are updated with a different logic and timings.

Differential Revision: https://phabricator.services.mozilla.com/D210943
2024-05-20 16:03:27 +00:00
Hubert Boma Manilla 6ee10584ed Bug 1890269 - [devtools] Implementing search highlight in codemirror 6 r=devtools-reviewers,nchevobbe
This patch
- Gets the search in file feature working for codemirror 6 (Use Ctrl/CMD F to open in the editor)
- Highlights search results in the editor, when using the search panel on the left.
- Includes the @codemirror/search package in the codemirror bundle. This enables using the `RegExpCursor`

Differential Revision: https://phabricator.services.mozilla.com/D208110
2024-05-20 09:50:41 +00:00
Hubert Boma Manilla 999135a4da Bug 1891336 - [devtools] Highlight text during pause and for exceptions r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D207418
2024-05-19 22:28:23 +00:00
Hubert Boma Manilla 2db2984f38 Bug 1889281 - [devtools] Display column breakpoints for codemirror 6 r=devtools-reviewers,nchevobbe
This patch creates a new extension and api enable marking content nodes

Differential Revision: https://phabricator.services.mozilla.com/D207408
2024-05-19 22:28:23 +00:00
Hubert Boma Manilla 412baef0b9 Bug 1894725 - [devtools] Scroll to the function when using the copy function context menu item r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D209676
2024-05-19 22:24:16 +00:00
Nicolas Chevobbe 468323a509 Bug 1888645 - [devtools] Fix SmartTrace crash with wasm frames. r=devtools-reviewers,bomsy.
In some cases, we were getting null sourceId, which was causing an exception
to be thrown in `getFormattedSourceId` since it expects a string.
We add a simple guard in this function so we don't throw anymore.

But we shouldn't get null sourceId in the first place. It looks like for
some Wasm sources, the SavedFrame sourceId can be 0, which wasn't playing
well with some loose check we were doing in the sources manager.

Finally, the "Copy metadata" button we display when a console message crash
wasn't working. The message now includes the targetFront, which can be serialized
in JSON, so we simply ignore it.

Differential Revision: https://phabricator.services.mozilla.com/D206105
2024-05-13 10:17:15 +00:00
Hubert Boma Manilla 5d85945437 Bug 1889276 - [devtools] Fix editor scrolling in codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D202125
2024-05-07 23:53:33 +00:00
Hubert Boma Manilla 235f6fbf11 Bug 1889277 - [devtools] Highlight selected lines of code for codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D209138
2024-05-05 13:11:04 +00:00
Hubert Boma Manilla 8ae9dd40fc Bug 1889277 - [devtools] Highlighting line on selection in code mirror 6 r=devtools-reviewers,nchevobbe
Note: While testing you might notice there is no scrolling, this is being fixed in D202125

Differential Revision: https://phabricator.services.mozilla.com/D205070
2024-05-05 13:11:04 +00:00
Hubert Boma Manilla cfc1737fd0 Bug 1889283 - [devtools] Add support for inline previews r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D208267
2024-05-05 13:11:03 +00:00
Hubert Boma Manilla 1d8c45e062 Bug 1894379 - [devtools] Make sure empty line markers are rendered on initial load r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D209072
2024-05-05 13:07:18 +00:00
Nicolas Chevobbe 1ba466a342 Bug 1892459 - [devtools] Add textInput in event listener breakpoints panel. r=devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D208857
2024-05-02 04:58:51 +00:00
Hubert Boma Manilla c66148a707 Bug 1887649 - [devtools] Show the conditional/log breakpoint panel in codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D205578
2024-04-30 22:15:17 +00:00
Tamas Szentpeteri dac2560d0e Backed out changeset c18051672452 (bug 1887649) for causing dt failures in browser_dbg-breakpoints-cond-ui-state.js. CLOSED TREE 2024-04-30 09:43:05 +03:00
Hubert Boma Manilla 976b715f39 Bug 1887649 - [devtools] Show the conditional/log breakpoint panel in codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D205578
2024-04-30 05:57:42 +00:00
Nicolas Chevobbe 381641953c Bug 1891681 - [devtools] Consider elements not in a CodeMirror line invalid mouse over target. r=devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D208490
2024-04-29 11:46:25 +00:00
Alexandre Poirot 424ff91ac8 Bug 1892905 - [devtools] Ensure tracing DOM Events for same-process iframe. r=devtools-reviewers,nchevobbe
The previous patch explicitly prevents spawning JavaScriptTracer for same-process iframe,
as the JavaScriptTracer can only be spawn once per thread.
But then the JavaScriptTracer should ensure tracking DOM Events for these same-process iframe globals.
`DebuggerNotificationObserver` requires to connect to each individual WindowGlobal.
Connecting to the top WindowGlobal isn't enough to receive DOM Events for children WindowGlobals.

Differential Revision: https://phabricator.services.mozilla.com/D208468
2024-04-25 11:26:23 +00:00
Hubert Boma Manilla 3e437ed282 Bug 1888864 - [devtools] Add click and context menu event listeners for the editor content r=devtools-reviewers,nchevobbe
With this patch the context menu for the editor should be visible

Differential Revision: https://phabricator.services.mozilla.com/D206291
2024-04-22 11:56:39 +00:00
Alexandre Poirot 6afb7bd003 Bug 1891699 - [devtools] Remove unused sourceMapURL React component property. r=devtools-reviewers,nchevobbe
This could possibly throw if sourceActor was null, and wasn't used.

Differential Revision: https://phabricator.services.mozilla.com/D207711
2024-04-17 13:54:27 +00:00
Hubert Boma Manilla 2dbbfbae6b Bug 1824109 - [devtools] Make sure the paused task is resumed before exiting r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D207088
2024-04-11 01:12:49 +00:00
Alexandre Poirot 6c428aaabd Bug 1866814 - [devtools] Merge all DevTools JS Actors into a single DOM Process JS Actor. r=devtools-reviewers,nchevobbe
* The formers JSWindow Actors used independently to create Target Actor for WindowGlobals, Web workers and Service workers
  are all unified behind a single JSProcess Actor pair which was only used to create target actors for DOM Content Processes.
* The DevToolsProcess JSProcess actor now actively monitor the currently watched target types
  in order to start and stop listeners specific to each target type.
  We no longer rely on JSWindow Actors to observe WindowGlobal instantiations.

* `watchedByDevTools` is now consistantly set from each WindowGlobal's content process, via the WindowGlobalTargetActor.
  With the new setup, the parent process no longer track WindowGlobal/BrowsingContext's and so there is no
  natural place to flag them. While, in the content process, the target actor is an obvious place.
  There is just one trick in window global target watcher in order to also set this flag on initial about blank documents.

* `browser-element-host` Session Data is now slightly more simple. It works like any other similar session data attribute.
  But we have to ignore any pending exception coming up from updateDomainSessionDataForServiceWorkers call as that be still pending
  while the toolbox closes, which make the JS Process Actor be unregistered,
  and ultimately make the underlying sendQuery promise be rejected.
* The `loader` is made specific to each Watcher/connection and put in the connections map,
  so that we can better support content toolbox & browser toolbox usecases
  and we have a unique place to define the loader per watcher/connection.

* browser_target_command_detach.js: detach is no longer enough. It wouldn't stop watching and prevent the re-instantiation
  of the target actor. We now have to stop watching for targets. This actually better match what happens on toolbox closing.
  This test was meant as a unit test for covering remote debugging reusing the same DevToolsClient for debugger the same tab.
* `browser_toolbox_watchedByDevTools`. The management of watchedByDevTools is now driven from the content process.
  And because the DevTools Server and especially the watcher actor is destroyed without an explicit RDP request
  that the toolbox destruction is waiting for, we can't rely on closeToolbox to know
  when the server is fully cleaned up.

Differential Revision: https://phabricator.services.mozilla.com/D203409
2024-04-02 08:54:51 +00:00
Alexandre Poirot d7f3cddc7f Bug 1888171 - [devtools] Convert Browser Loader to ESM. r=profiler-reviewers,devtools-reviewers,nchevobbe,julienw
Differential Revision: https://phabricator.services.mozilla.com/D205867
2024-03-28 15:15:24 +00:00
Cristian Tuns db7b2a330c Backed out 3 changesets (bug 1866814) for causing bc failures browser_ext_devtools_inspectedWindow_targetSwitch.js CLOSED TREE
Backed out changeset 5d59dd808307 (bug 1866814)
Backed out changeset f503f5d02d1e (bug 1866814)
Backed out changeset d27f783be149 (bug 1866814)
2024-03-28 08:37:11 -04:00
Alexandre Poirot ee299a8d02 Bug 1866814 - [devtools] Merge all DevTools JS Actors into a single DOM Process JS Actor. r=devtools-reviewers,nchevobbe
* The formers JSWindow Actors used independently to create Target Actor for WindowGlobals, Web workers and Service workers
  are all unified behind a single JSProcess Actor pair which was only used to create target actors for DOM Content Processes.
* The DevToolsProcess JSProcess actor now actively monitor the currently watched target types
  in order to start and stop listeners specific to each target type.
  We no longer rely on JSWindow Actors to observe WindowGlobal instantiations.

* `watchedByDevTools` is now consistantly set from each WindowGlobal's content process, via the WindowGlobalTargetActor.
  With the new setup, the parent process no longer track WindowGlobal/BrowsingContext's and so there is no
  natural place to flag them. While, in the content process, the target actor is an obvious place.
  There is just one trick in window global target watcher in order to also set this flag on initial about blank documents.

* `browser-element-host` Session Data is now slightly more simple. It works like any other similar session data attribute.
  But we have to ignore any pending exception coming up from updateDomainSessionDataForServiceWorkers call as that be still pending
  while the toolbox closes, which make the JS Process Actor be unregistered,
  and ultimately make the underlying sendQuery promise be rejected.
* The `loader` is made specific to each Watcher/connection and put in the connections map,
  so that we can better support content toolbox & browser toolbox usecases
  and we have a unique place to define the loader per watcher/connection.

* browser_target_command_detach.js: detach is no longer enough. It wouldn't stop watching and prevent the re-instantiation
  of the target actor. We now have to stop watching for targets. This actually better match what happens on toolbox closing.
  This test was meant as a unit test for covering remote debugging reusing the same DevToolsClient for debugger the same tab.
* `browser_toolbox_watchedByDevTools`. The management of watchedByDevTools is now driven from the content process.
  And because the DevTools Server and especially the watcher actor is destroyed without an explicit RDP request
  that the toolbox destruction is waiting for, we can't rely on closeToolbox to know
  when the server is fully cleaned up.

Differential Revision: https://phabricator.services.mozilla.com/D203409
2024-03-28 10:47:17 +00:00
Norisz Fay 8b02ae61da Backed out 2 changesets (bug 1887872) for causing dt failures on browser_dbg-old-breakpoint.js CLOSED TREE
Backed out changeset b32b818f2175 (bug 1887872)
Backed out changeset 705494857aed (bug 1887872)
2024-03-27 21:22:10 +02:00
Alexandre Poirot a8382fe8a1 Bug 1887872 - [devtools] Set event breakpoints on toolbox opening. r=devtools-reviewers,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D205773
2024-03-27 17:04:34 +00:00
Alexandre Poirot 1ec9670095 Bug 1887872 - [devtools] Set breakpoints on toolbox opening. r=devtools-reviewers,devtools-backward-compat-reviewers,bomsy
Register them as soon as we open devtools, instead of waiting for debugger panel opening.
So that breakpoints can work even if we did not open debugger panel yet.
So far, only debugger statement would force the opening of the debugger.

This allows to remove the redundant code from debugger frontend.

Also clarify in this patch that thread-utils exports thread configurations.

Differential Revision: https://phabricator.services.mozilla.com/D205772
2024-03-27 17:04:34 +00:00
artem manushenkov 0c607a8763 Bug 1731635 [devtools] Add option to disable split console r=nchevobbe,fluent-reviewers,devtools-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D204142
2024-03-27 06:34:50 +00:00
Hubert Boma Manilla 34047e8c3a Bug 1886967 - [devtools] Cleanup the API to make more consitent r=devtools-reviewers,nchevobbe
- Added the requirement for a new `id` property to markers passed to the `setLineGutterMarkers` API.
- Changed `gutterLineClassName` to `lineClassName` the API name already indicates that it is the gutter, no need to have gutter in the property name, this also amkes it consistent with `setLineContentMarker`
- Changed `createGutterLineElementNode` to `createLineElementNode` for same reason as above.

Differential Revision: https://phabricator.services.mozilla.com/D205435
2024-03-25 21:56:12 +00:00
Hubert Boma Manilla 52512158d0 Bug 1884651 - [devtools] Render line exception marker r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D205001
2024-03-25 21:56:12 +00:00
Hubert Boma Manilla 19447f120d Bug 1884651 - [devtools] Render blackbox marker for blackboxed line content r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204926
2024-03-25 21:56:12 +00:00
Hubert Boma Manilla 1f236dbd77 Bug 1884651 - [devtools] Rendering debug lines when paused in code mirror 6 r=devtools-reviewers,nchevobbe
In this patch
- we begin to render debug lines when paused.
- New APIs are added to add and remove line content markers

Differential Revision: https://phabricator.services.mozilla.com/D204243
2024-03-25 21:56:11 +00:00
pstanciu 26e14298bd Backed out 3 changesets (bug 1884651) for causing pause line failures e.g. on browser_dbg-keyboard-shortcuts.js
Backed out changeset 571e7f23a751 (bug 1884651)
Backed out changeset 3c52a12e9f0c (bug 1884651)
Backed out changeset f7201f71c231 (bug 1884651)
2024-03-25 17:18:30 +02:00
Hubert Boma Manilla 017a178876 Bug 1884651 - [devtools] Render line exception marker r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D205001
2024-03-25 13:47:42 +00:00
Hubert Boma Manilla 86a391034e Bug 1884651 - [devtools] Render blackbox marker for blackboxed line content r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204926
2024-03-25 13:47:42 +00:00
Hubert Boma Manilla 3a4f688073 Bug 1884651 - [devtools] Rendering debug lines when paused in code mirror 6 r=devtools-reviewers,nchevobbe
In this patch
- we begin to render debug lines when paused.
- New APIs are added to add and remove line content markers

Differential Revision: https://phabricator.services.mozilla.com/D204243
2024-03-25 13:47:42 +00:00
Dave Townsend 4ed07cf8f5 Bug 1864896 Remove additional unused function arguments.
Differential Revision: https://phabricator.services.mozilla.com/D205297
2024-03-21 10:35:45 +00:00
Dave Townsend 188a75ae0a Bug 1864896: Enable unused argument lint rule. r=Standard8,perftest-reviewers,geckoview-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,nchevobbe,robwu,sparky,issammani,sgalich,owlish,migration-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D195632
2024-03-21 08:50:00 +00:00
Hubert Boma Manilla 46c298c344 Bug 1882060 - [devtools] Render blackbox lines markers in gutter for codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204049
2024-03-21 07:48:59 +00:00
Hubert Boma Manilla 88000fd4f6 Bug 1882060 - [devtools] Add line breakpoint classes and display gutter breakpoint markers r=devtools-reviewers,nchevobbe
Highlights
- This fixes gutter breakpoints
- Disabling breakpoints should work

Note:
Log breakpoints & Conditional Breakpoints don't work

Differential Revision: https://phabricator.services.mozilla.com/D203451
2024-03-21 07:48:59 +00:00
Hubert Boma Manilla bbab5fc674 Bug 1882060 - [devtools] Add support for empty lines markers to codemirror 6 r=devtools-reviewers,nchevobbe
In this patch
1) Adds the `setLineGutterMarkers` function to the editor which enables defining gutter markers
the line number gutter component. This also updates the line number gutter when the viewport (visible ranges)
change (This usually happens when the editor is scrolled).

2)The first use of the `setLineGutterMarkers` is for rendering empty lines

Differential Revision: https://phabricator.services.mozilla.com/D202716
2024-03-21 07:48:58 +00:00
Cristina Horotan b537a35df5 Backed out 3 changesets (bug 1882060) for causing dt failures at DOMSecurityMonitor.cpp CLOSED TREE
Backed out changeset 1d39266eb67d (bug 1882060)
Backed out changeset a72df33c8fb6 (bug 1882060)
Backed out changeset 16a6afc63e6c (bug 1882060)
2024-03-20 16:35:03 +02:00
Hubert Boma Manilla 4dfcca4e1f Bug 1882060 - [devtools] Render blackbox lines markers in gutter for codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204049
2024-03-20 13:08:31 +00:00
Hubert Boma Manilla ede9d94c36 Bug 1882060 - [devtools] Add line breakpoint classes and display gutter breakpoint markers r=devtools-reviewers,nchevobbe
Highlights
- This fixes gutter breakpoints
- Disabling breakpoints should work

Note:
Log breakpoints & Conditional Breakpoints don't work

Differential Revision: https://phabricator.services.mozilla.com/D203451
2024-03-20 13:08:31 +00:00
Hubert Boma Manilla d99a480af2 Bug 1882060 - [devtools] Add support for empty lines markers to codemirror 6 r=devtools-reviewers,nchevobbe
In this patch
1) Adds the `setLineGutterMarkers` function to the editor which enables defining gutter markers
the line number gutter component. This also updates the line number gutter when the viewport (visible ranges)
change (This usually happens when the editor is scrolled).

2)The first use of the `setLineGutterMarkers` is for rendering empty lines

Differential Revision: https://phabricator.services.mozilla.com/D202716
2024-03-20 13:08:30 +00:00
Alexandre Poirot 3b01dc6f89 Bug 1713093 - [devtools] Allow using waitForSource to retrieve source object asynchronously. r=devtools-reviewers,nchevobbe
waitForSource wasn't fully reliable to retrieve the source object.
Now that it is, we can remove a few useless usages of findSource following it.

Differential Revision: https://phabricator.services.mozilla.com/D203447
2024-03-20 12:30:17 +00:00
Alexandre Poirot 26d9f9bb91 Bug 1713093 - [devtools] Remove TargetMixin.attachThread. r=devtools-reviewers,nchevobbe
This code was only used for workers targets, which weren't passing breakpoints
from the server side via "sessionData" concept.
Instead, we were still relying on the frontend to pass them and only after that
manually requesting the thread to resume its execution.

Now, there is still a notion of "attach" around the thread actor.
While all the targets are immediately instantiating their related thread actor,
the thread actor isn't active by default.
It becomes active as soon as:
* SOURCE or THREAD_STATE resource is watched
* breakpoints are set via session data (breakpoint list actor)
* thread configuration are set via session data (thread configuration actor)
I had to do one of these things in order to keep test from working.
In the production code, we do most of these things by default on the toolbox startup.
We could revise this behavior by:
* always attaching the thread actor, but it may start pausing unexpectedly in some tests.
* decouple sources from breakpoints within the thread actor, so that watching for sources doesn't necessarily "attach" the thread actor and activate breakpoints/debugger statements.
* have a new thread configuration to explicitly enable the thread actor pausing features.

I'm often using thread configuration to enable pausing in tests.
This required to improve xpcshell test helpers to be able to use Watcher/Commands.

About browser_target_command_bfcache.js, the DevTools code is now so quick that the
back/forward requests at done too quickly one after the other and fail actually moving to
the other document.

Differential Revision: https://phabricator.services.mozilla.com/D166321
2024-03-20 12:30:17 +00:00
Hubert Boma Manilla 11e553435e Bug 1882060 - [devtools] Add gutter events for click and context menu r=devtools-reviewers,nchevobbe
With this patch
- The line gutter context menu will get displayed on right click of the gutter
- Clicking line gutter should set breakpoints

Note not covered in this patch:-
- Context menu feaures might not work
- Line breakpoints are not showing yet ( this is coming in a future patch)

Differential Revision: https://phabricator.services.mozilla.com/D203210
2024-03-18 09:51:29 +00:00
Hubert Boma Manilla 45aaeea8bb Bug 1882060 - [devtools] Cleanup code which toggles the folder gutter visibility r=devtools-reviewers,nchevobbe
These mouseover/mouseout events are for showing & hiding  the code fold gutter.
This does not actually work, and not seem to useful.

Differential Revision: https://phabricator.services.mozilla.com/D203251
2024-03-18 09:51:28 +00:00
Hubert Boma Manilla 3d21a16949 Bug 1882333 - [devtools] Update the editor toggle button size when the editior dimensions change r=devtools-reviewers,nchevobbe
This patch updates the size of the button (above the editor gutter) which toogles the sidebar for codemirror 6.
Note this was broken with the current codemirror as wel so fixed both.

Also adding the ability to attach an updateListener to the editor we can listen for editor changes.

Differential Revision: https://phabricator.services.mozilla.com/D202398
2024-03-18 09:51:27 +00:00