Commit Graph
55 Commits
Author SHA1 Message Date
Alexandra Borovova 574778d7e5 Bug 2005054 - [devtools] Extract "formatMessageParametersAndText" into a shared module to make it easier to reuse in WebDriver BiDi. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D289754
2026-03-31 09:40:31 +00:00
Julian Descottes f8d2e20c42 Bug 2012759 - [devtools] Frame component should skip sourcemap resolution for line=0 locations r=devtools-reviewers,ochameau
Locations with line=0 normally indicate that we have no line information for the location.
In this case, it is useless to query the sourcemap service from the Frame component.
Additionally check if column is 0 or 1 to be more confident that this is a default location.

Differential Revision: https://phabricator.services.mozilla.com/D281033
2026-02-09 14:14:42 +00:00
Mark Banner 2542790f53 Bug 1998787 - Automatic fixes for enabling ESLint jsdoc/tag-line rule everywhere. r=frontend-codestyle-reviewers,mtigley,perftest-reviewers,nchevobbe,home-newtab-reviewers,Gijs,mconley,sparky
Differential Revision: https://phabricator.services.mozilla.com/D271745
2025-11-10 21:27:12 +00:00
Alexandre Poirot 2817046a27 Bug 1985446 - [devtools] Fix mismatch in column offset between console and debugger. r=devtools-reviewers,bomsy
SmartTrace is actually consuming 1-based columns coming from ObjectActor grip
for JS Error object's stacktrace.
But it maps to 0-based columns as it relies on Debugger Frames components.
This is made uterly complicated as we also have to deal with source maps
and original locations which are 0-based as well.

Differential Revision: https://phabricator.services.mozilla.com/D263580
2025-09-22 08:52:55 +00:00
Alexandre Poirot bd9cc9ff8c Bug 1898485 - [devtools] Fix column number displayed in console and link when opening in the debugger. r=devtools-reviewers,nchevobbe
There was three issues:
* one specific to original source. We were asking to resolve the 1-based column to SourceMapURLService,
whereas it expects a 0-based column (fix made to savedFrameToLocation).
* then for all sources, we were trying to open the debugger from 1-based column for generated sources,
whereas the debugger expects 0-based column. (And original source were 0-based, but mapped from the wrong generated location...)
* log point were emiting CONSOLE_MESSAGE resource whose `frame` objects were using 0-based columns,
whereas regular console message resource were using 1-based columns (as they are pulled from Spidermonkey's SavedFrame
which is 1-based)

Also adapt the tracer to the new behavior of Frame component and acknowledge that frames
use 1-based numbers.

Differential Revision: https://phabricator.services.mozilla.com/D249065
2025-05-15 23:51:02 +00:00
Alexandre Poirot e1f9301f4e Bug 1953578 - [devtools] Migrate all usage of react-prop-types CommonJS module to the ES Module version and remove the CommonJS version. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D241594
2025-03-19 13:30:51 +00:00
Alexandre Poirot 26260731f1 Bug 1953578 - [devtools] Migrate all usage of react CommonJS module to the ES Module version and remove the CommonJS version. r=devtools-reviewers,profiler-reviewers,nchevobbe,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D241593
2025-03-19 13:30:51 +00:00
Abhijeet Chawla 66f515fab4 Bug 1810437 - Stop using UNSAFE_componentWillMount in devtools/client/shared/components/Frame.js r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D227767
2024-11-04 09:39:30 +00:00
Alexandre Poirot 4c946b19bd Bug 1885054 - [devtools] Display tracer data in a debugger sidebar. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204446
2024-07-22 18:49:43 +00:00
Sandor Molnar 0e45f1b380 Backed out changeset b6571a4222fb (bug 1885054) for causing bug 1909068 CLOSED TREE 2024-07-22 18:24:44 +03:00
Alexandre Poirot c2af106622 Bug 1885054 - [devtools] Display tracer data in a debugger sidebar. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204446
2024-07-18 09:02:06 +00:00
Mark Banner 0666077666 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Nicolas Chevobbe 3e09aa7810 Bug 1010150 - [devtools] Allow to pretty-print inline scripts. r=devtools-reviewers,ochameau.
To do this, we need to only have a single SourceMapGenerator instance for all
the inline scripts of an HTML file, for which we add mappings with offsets based
on where the inline script is in the HTML file.

To support that, we add a new prettyPrintInlineScript task, which takes a taskId
so we can have one SourceMapGenerator for a given taskId, that we then pass
to prettyFast.

A test is added to ensure different cases of inline scripts are pretty printed
as expected, that resulting console messages location are updated and that the
event tooltip in the inspector shows the pretty file as well.

`findColumnBreakpoint` helper was fixed to look into the correct location for
original file (which pretty-printed file are)
`assertLineIsBreakable` is modified to show the text of the line so it's easier
to debug failures.

Differential Revision: https://phabricator.services.mozilla.com/D170751
2023-03-22 22:02:10 +00:00
Alexandre Poirot 2835586738 Bug 1801695 - [devtools] Rename SourceMapService to SourceMapLoader. r=bomsy
Also rename a few symbols to better identify SourceMapURLService.

Differential Revision: https://phabricator.services.mozilla.com/D162969
2022-12-12 13:15:53 +00:00
Alexandre Poirot a85b82697f Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/shared. r=jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D158379
2022-09-30 15:17:39 +00:00
Tetsuharu Ohzeki 7c92bd768e Bug 1508688 - Add UNSAFE_ prefix to React deprecated lifecycle methods in devtools/client/shared/. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D149483
2022-06-16 10:03:11 +00:00
Feng Yu 86cc282e6a Bug 1554887 - [devtools] Remove eslint-disable complexity in devtools/client/shared/components/Frame.js. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D144802
2022-05-02 11:42:03 +00:00
Nicolas Chevobbe 1095bdfd19 Bug 1761510 - [devtools] Remove extra element for console message location. r=bomsy.
we directly use what's returned from the `Frame` component. We allow to pass
an extra `className` prop to it so we can still add the `message-location` class
that is used in the console.

Differential Revision: https://phabricator.services.mozilla.com/D142097
2022-03-31 06:55:09 +00:00
Nicolas Chevobbe 9437d397c0 Bug 1761510 - [devtools] Remove frame-link-source-inner element in Frame component. r=bomsy.
This simplifies the markup a bit, and hopefully could contribute to improve
layout and styling performance in the console.

Differential Revision: https://phabricator.services.mozilla.com/D142096
2022-03-31 06:55:09 +00:00
Logan Smyth 4064b56e7e Bug 1643180 - Part 2: Update the Frame component to always pass generated position to view source. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D78381
2020-06-05 22:18:38 +00:00
Logan Smyth 5dde3a8d07 Bug 1642371 - Part 7: Reimplement SourceMapURLService to allow subscribing/querying by URL _and_ ID. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D77743
2020-06-04 19:51:50 +00:00
Logan Smyth 33c382fff2 Bug 1642371 - Part 6: Expose the original position as an object for simpler arg processing. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D77742
2020-06-03 22:39:44 +00:00
Logan Smyth f555d2e06d Bug 1642371 - Part 5: Make .unsubscribe private in the source-map-url-service. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D77741
2020-06-03 22:38:56 +00:00
Logan Smyth 40a0721e2a Bug 1642371 - Part 2: Consistently differentiate sourceMapService and sourceMapURLService. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D77738
2020-06-02 22:30:40 +00:00
Julian Descottes 03cdcd7b0a Bug 1593921 - Use eslint-disable-next-line to disable complexity checks in DevTools r=pbro
Using next-line is less error prone for refactorings than wrapping methods with enable/disable blocks.

Differential Revision: https://phabricator.services.mozilla.com/D51782
2019-11-05 14:29:04 +00:00
Nicolas Chevobbe ce25c3f455 Bug 1519103 - Remove Scratchpad panel. r=bgrins.
Differential Revision: https://phabricator.services.mozilla.com/D50583
2019-10-27 09:05:58 +00:00
Nicolas Chevobbe 95fe5fa94a Bug 1589346 - Fix navigation to debugger from console on prettified sources. r=loganfsmyth.
This revert the changes made in Bug 1587839, except the added test.
The safer fix to be uplifted is to only fix the original issue
in the SmartTrace component, where we remove any sourceId we might
have when creating the new mapped frame.

We also modify the browser_dbg-pretty-print-console test to ensure
clicking on a prettified location in the console does open the
debugger with the expected location.

Differential Revision: https://phabricator.services.mozilla.com/D50173
2019-10-25 12:16:52 +00:00
Daniel Varga 468535502e Backed out changeset fac6219649be (bug 1587839) on request by nchevobbe DONTBUILD 2019-10-25 14:56:44 +03:00
Nicolas Chevobbe d5e92c7863 Bug 1587839 - Fix navigation to debugger from console on prettified sources. r=loganfsmyth.
This revert the changes made in Bug 1587839, except the added test.
The safer fix to be uplifted is to only fix the original issue
in the SmartTrace component, where we remove any sourceId we might
have when creating the new mapped frame.

We also modify the browser_dbg-pretty-print-console test to ensure
clicking on a prettified location in the console does open the
debugger with the expected location.

Differential Revision: https://phabricator.services.mozilla.com/D50173
2019-10-25 06:21:18 +00:00
Nicolas Chevobbe f9ea075d15 Bug 1587839 - Pass the sourceId to sourcemap service subscribe callback. r=loganfsmyth.
The sourceId is then used in the various places where we call the sourcemap service.
A test is added in the console to make sure that we do navigate to the mapped
location in the debugger.

Differential Revision: https://phabricator.services.mozilla.com/D49103
2019-10-16 00:16:55 +00:00
Jason Laster 43c928f810 Bug 1573890 - Simplify logpoint messages. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D41990
2019-08-16 17:28:40 +00:00
Dorel Luca 0ee4b10233 Backed out changeset 6e01b87795cf (bug 1573890) for Devtools failures. CLOSED TREE 2019-08-16 19:36:41 +03:00
Jason Laster d69f796598 Bug 1573890 - Simplify logpoint messages. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D41990
2019-08-16 14:55:35 +00:00
chujun c6fa068ff8 Bug 1557138 Clicking logpoint location in console opens the logpoint editing panel in debugger r=nchevobbe,jlast
I pass `frame.origin` in `viewSourceInDebugger`. When `reason` is logpoint, run `openConditionalPanel`.

Differential Revision: https://phabricator.services.mozilla.com/D35624
2019-08-14 16:10:50 +00:00
Armando Ferreira 00945f5389 Bug 1546347 - Message location on CSS Warnings has an erroneous title attribute. r=nchevobbe
Adding a new opcional property to Frame.js, messageSource, which will allows us to know the source of the Message. We will be using this property to display the correct tooltip message.

Differential Revision: https://phabricator.services.mozilla.com/D38139
2019-07-18 06:17:16 +00:00
Victor Porof b7732ae890 Bug 1561435 - Format devtools/client/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35884
2019-07-05 11:24:38 +02:00
chujun 0f000fd48b Bug 1536854 - Log errors from logpoint as actual errors in the console r=davidwalsh,nchevobbe
If logpoint throws, set `level` to "error".
Add tests to ensure the correct level is set.

Demo function: https://luxuriant-system.glitch.me/
Add some logpoints. The first two statements are invalid. The third one is valid.
{F1311386}

In console:
{F1311387}

Differential Revision: https://phabricator.services.mozilla.com/D31157
2019-06-12 12:10:35 +00:00
Patrick Brosset d93842478f Bug 1553451 - Lower the eslint complexity level to 20 for devtools and exlude more complex functions; r=jdescottes
We want to go back to ESLint's default complexity level so that newly introduced code is checked for complexity.
At the same time, to make that work, we're excluding all of the more complex functions for now.
We should fix them: make them less complex, and remove the eslint-disable comment.
See bug 1553449 for more information about this.

Differential Revision: https://phabricator.services.mozilla.com/D32139
2019-05-23 09:06:16 +00:00
Mihai Alexandru Michis c358baf0c3 Backed out changeset 0f9626b48a66 (bug 1553451) for linting failures. CLOSED TREE 2019-05-23 10:58:22 +03:00
Patrick Brosset 18bd75fb8c Bug 1553451 - Lower the eslint complexity level to 20 for devtools and exlude more complex functions; r=jdescottes
We want to go back to ESLint's default complexity level so that newly introduced code is checked for complexity.
At the same time, to make that work, we're excluding all of the more complex functions for now.
We should fix them: make them less complex, and remove the eslint-disable comment.
See bug 1553449 for more information about this.

Differential Revision: https://phabricator.services.mozilla.com/D32139
2019-05-23 07:07:49 +00:00
Brian Hackett 14748fa393 Bug 1531826 Part 2 - Frames with source IDs should always be linkable, r=nchevobbe. 2019-03-04 06:20:09 -10:00
Brian Hackett fa5e9ef447 Bug 1447244 Part 7 - Devtools client changes for script source IDs, r=lsmyth. 2019-01-16 12:01:33 -10:00
Kris Maglione bd9569ef4c Bug 1356412: Part 1 - Remove subscript loader path mangling. r=mccr8
This was only ever useful before we had compartment-based security isolation.
Now it is just a pervasive nuisance.

Differential Revision: https://phabricator.services.mozilla.com/D10795
2018-11-02 14:45:12 -07:00
Nicolas Chevobbe 77fa030884 Bug 1501632 - Return an unsubscribe function from SourceMapURLService.prototype.subscribe; r=loganfsmyth.
The SourceMapURLService has a subscribe and an unsubscribe
functions to respectively listen and stop listening for
source map changes on a given location (url + line + column).
The unsubscribe function need to be called with the same
parameters as the subscribe function, which means the consumer
need to keep a reference to the callback.
By making the subscribe function return the unsubscribe function,
this makes things a bit easier.

Differential Revision: https://phabricator.services.mozilla.com/D9784
2018-10-25 17:15:45 +00:00
Mark Banner 3d6aaad3f5 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389
2018-10-19 12:55:39 +00:00
Julian Descottes 82711b9a8f Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4
2018-06-01 12:36:09 +02:00
Zhang Junzhi 9470148fb1 Bug 1448553 - Part 2: Decodeds Punycode-encoded international domain names and URI-encoded filenames in the Web Console so that they are displayed as human-readable Unicode text. r=nchevobbe
The Punycode-encoded international domain names and URI-encoded filenames are
human-unreadable, so they should be displayed as human-readable Unicode text.
This commit decodes this kind of names in the Web Console.

MozReview-Commit-ID: 8AVLkdaQOh6
2018-04-02 15:23:22 +08:00
Nicolas Chevobbe dae11d6da6 Bug 1442602 - Fix Frame component for browser-loader requested resources; r=miker.
There wasn't anything done for this kind of resources, so the URL looked
like resource://devtools/shared/base-loader.js -> resource://devtools/path/to/file.js
and was causing issue in the onClick handler.

MozReview-Commit-ID: GUJOpjDX1zG
2018-03-02 17:56:10 +01:00
Michael Ratcliffe fa940b81ef Bug 1439673 - Fix React 16 warnings r=nchevobbe
I believe this fixes all warnings except for one. This warning appears the first time the memory panel is selected:
"Warning: Failed prop type: Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types
    in MemoryApp (created by Connect(MemoryApp))
    in Connect(MemoryApp) (created by bound createElementWithValidation)
    in bound createElementWithValidation
    in Provider"

This appears to be an issue with `devtools/client/memory/app.js` but I will log a new bug for this.

MozReview-Commit-ID: 341zdQyfgrN
2018-02-21 20:34:19 +00:00
abhinav ae2056973d Bug 1421225 - Clicking on a console.group Message should toggle the group. r=nchevobbe
MozReview-Commit-ID: IuK0R1Ebv8o
2018-01-23 09:28:15 +05:30