Also allow logging trace whenever any DOM Element get added, removed or modified.
For now this is exposed only via the console command via:
:tracer --dom-mutations (for all types of mutation)
:tracer --dom-mutations add,attributes,remove (coma separated list of mutation types you want to listen for)
Also revise the handling of "isWorker" so that all checks have the best possible check.
Differential Revision: https://phabricator.services.mozilla.com/D201976
The JavaScript Tracer may be initiated by the debugger, or stoped by itself when reaching some limit.
In these cases, the start and stop messages wouldn't have been logged in the console.
Differential Revision: https://phabricator.services.mozilla.com/D196831
The JavaScript Tracer may be initiated by the debugger, or stoped by itself when reaching some limit.
In these cases, the start and stop messages wouldn't have been logged in the console.
Differential Revision: https://phabricator.services.mozilla.com/D196831
This help reduce the RDP overhead by only transferring what is strictly necessary.
The console message resources bundles various useless attributes.
This also help use a custom rendering in the frontend so that traces can
be displayed distinctly and differently from the console API calls.
Differential Revision: https://phabricator.services.mozilla.com/D196020
This help reduce the RDP overhead by only transferring what is strictly necessary.
The console message resources bundles various useless attributes.
This also help use a custom rendering in the frontend so that traces can
be displayed distinctly and differently from the console API calls.
Differential Revision: https://phabricator.services.mozilla.com/D196020
When persist log is enabled and console.clear is called,
don't clear the output and display a message to indicate
the method was ignored
Differential Revision: https://phabricator.services.mozilla.com/D183854
This will help transition to ES Modules as this symbol is exposed to them.
$ sed -ie "/require(.Services.)/d" $(git grep -l 'require("Services")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .Services./d" $(git grep -l 'loader.lazyRequireGetter(this, "Services"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js
+ manual eslint fixes
+ removal of devtools-services in the debugger, except for jest tests
Differential Revision: https://phabricator.services.mozilla.com/D156401
This allows to pull out target management code out from toolbox back to TargetCommand.
And then allows to more easily share this store in the context of the browser console,
where there is no toolbox.
This is also an interesting example on how commands may populate redux store directly
so that we avoid having each panel translate commands's event into actions.
An alternative here, would be to introduce some generic layer between commands and redux.
Which would be the glue between a command and populating a store.
Differential Revision: https://phabricator.services.mozilla.com/D151493
This fixes an intermittent on browser_webconsole_warn_about_replaced_api.js where
an assertion was failing because the navigation message had the `console-api` class.
We take this as an opportunity to add a navigation marker specific component instead
of reusing the ConsoleApiCall one.
Differential Revision: https://phabricator.services.mozilla.com/D149739
We don't have a toolbox in the Browser Console, so we don't
need to have a Provider for its store.
A simple test is added, just checking that the action was
triggered.
Differential Revision: https://phabricator.services.mozilla.com/D149593
This Rep hooks into the default display of objects and outputs a JsonML (http://www.jsonml.org) representation of them if custom formatters are enabled and a custom formatter is defined for them.
It handles headers and bodies of custom formatters. Bodies are handled asynchronously from their corresponding headers.
Because custom formatters allow a website to provide CSS styles to be used for formatting an object within the DevTools, those styles are filtered first to avoid breaking their layout.
It is currently only applied to the output of the Webconsole and within the variable value popup and the watch expressions within the Debugger.
***
Differential Revision: https://phabricator.services.mozilla.com/D140119
This is a naive implementation where we re-create a ConsoleOutput
element, reusing the existing store, and passing a specific prop
so all the messages would be rendered.
In order to include stacktraces, we pass a `0` initial render delay to the
callsites of the `SmartTrace` component.
We take this as an opportunity to extend the test coverage of `SmartTrace` around
this feature.
Differential Revision: https://phabricator.services.mozilla.com/D142189
This is a naive implementation where we re-create a ConsoleOutput
element, reusing the existing store, and passing a specific prop
so all the messages would be rendered.
In order to include stacktraces, we pass a `0` initial render delay to the
callsites of the `SmartTrace` component.
We take this as an opportunity to extend the test coverage of `SmartTrace` around
this feature.
Differential Revision: https://phabricator.services.mozilla.com/D142189
This should be ready to review. However, I will include a big caveat that I
tried to do things the Reacty way, and it felt really awkward. Notably, I used
a React functional component, because they seem to be recommended as the
Right Way to do things, but because of all the state we need to keep track of,
as well as just the props that we don't want to lexically access because then
they can be stale, it felt really wrong. Guidance is welcome.
However, the core logic should be ready for review, so focus on that, and let
me know if I need to move anything around to make it more palatable.
Depends on D138030
Differential Revision: https://phabricator.services.mozilla.com/D138031
- `category` isn't being used for console messages, so we can remove it
- `chromeContext` is only helpful when it's true, so we can omit it when it is not
We take this as an opportunity to test more properties and more message types
in browser_resources_console_messages.js.
Differential Revision: https://phabricator.services.mozilla.com/D141599
This action provides little value since we have a "Export to clipboard" action
that goes a step further.
Removing it will also help with virtualization as it will be one less thing to
take care of.
Differential Revision: https://phabricator.services.mozilla.com/D140804
This action provides little value since we have a "Export to clipboard" action
that goes a step further.
Removing it will also help with virtualization as it will be one less thing to
take care of.
Differential Revision: https://phabricator.services.mozilla.com/D140804
The formatReps function was iterating twice on all the parameters,
first with a map call, and then a reduce call, in which we were
recreating a new array for each parameter.
We turn this into a simple for loop so we'll iterate only once.
We also simplify the getObjectInspector function so it doesn't
create new objects when there's no need to.
Differential Revision: https://phabricator.services.mozilla.com/D138885
If the message isn't a warning or an info, it can't
be in a warningGroup, so we can exit the function
earlier and avoid useless checks.
Differential Revision: https://phabricator.services.mozilla.com/D138299
It could happen that 2 warning group messages could be added successively, before
the navigation message was emitted.
In the reducer, the second message would be seen the same as the first one, and
we'd try to increment the repeat count for the first one.
Unfortunately, the code was expecting a warning group to be created, and there
was an exception thrown as we couldn't retrieve it.
This is fixed by not allowing warning groups to be repeated.
A mocha test is added instead of a mochitest, as the issue would have been tricky
to trigger properly.
Differential Revision: https://phabricator.services.mozilla.com/D113276
At the moment, the ObjectInspector, while having its own reducer and actions, has its
state located in the state of its consumer application (e.g. webconsole, debugger).
This patch, by adding a `standalone` prop to the ObjectInspector, will allow the said
consumer to not have the object inspector state shared anymore.
This makes interaction in a given objectInspector much faster as only one instance
will have its lifecycle methods triggered. It also prevent cloning the consumer's state
on each object inspector interaction.
This new props is only used in the webconsole for now, as the debugger might need
to have access to its objectInspector state (this is also less of a problem, because
the debugger won't hold that much instances at a given point in time, unlike the console).
The DAMP data seems to indicate a 40% improvement in the console when expanding
an object while there are a thousand instances in the console.
Differential Revision: https://phabricator.services.mozilla.com/D99472
Since we now always have a contentDomReference in grips, we
don't need to fallback on gripToNodeFront.
And since gripToNodeFront was only used from getNodeFrontFromNodeGrip,
we can remove it, as well as the walker actor method getNodeActorFromObjectActor.
We also had to get a content reference from a rendered Reps in the console, for
the "Reveal in inspector" context menu entry, so we stringigy it in a data attribute.
Differential Revision: https://phabricator.services.mozilla.com/D98720