Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Source is not showing in 5.0.2 #28558

Closed
pavel-plehanov opened this issue Mar 14, 2024 · 14 comments
Closed

Bug: Source is not showing in 5.0.2 #28558

pavel-plehanov opened this issue Mar 14, 2024 · 14 comments
Labels
Resolution: Stale Automatically closed due to inactivity Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@pavel-plehanov
Copy link

Stand

DevTools version: 5.0.2-47cf347e4
Chrome 122.0.6261.129 x64, Edge 122.0.2365.80 x64

Propblem

In the DevTools -> Components -> source.
The path to the bundle.js file is specified.

v5.0.2

image
image
image
image

v5.0.0

image
image
image

Analog Issue

#28544
@hoxyq this is has nothing to do with reality.
But "source" work in "DevTools version: 5.0.0-993c4d003"
And doesnt wokr in "DevTools version: 5.0.2-47cf347e4"

Tested one application on the same PC at the same time in the defferent version DevTools.
Equal SourceMap

React version: 18

The current behavior

Open DevTools, choose component -> the source field contains the name of the component

The expected behavior

Open DevTools, choose component -> the source field says "bundle.js:[lineNumber]".

@pavel-plehanov pavel-plehanov added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Mar 14, 2024
@pavel-plehanov pavel-plehanov changed the title Bug: Bug: Source is not showing Mar 14, 2024
@pavel-plehanov pavel-plehanov changed the title Bug: Source is not showing Bug: Source is not showing in 5.0.2 Mar 14, 2024
@shreeyansh-mesh
Copy link

It's working in firefox but not in chrome, likely recent chrome update broke it

@pavel-plehanov
Copy link
Author

Он работает в Firefox, но не в Chrome, вероятно, недавнее обновление Chrome сломало его.

In my Firefox - v5.0.0

@hoxyq
Copy link
Contributor

hoxyq commented Mar 14, 2024

Hey @pavel-plehanov, thanks for reporting this.

As I've mentioned in #28544 (comment), this is expected change. In v5.0.0 RDT is using __debugSource field from fiber, which is soon will be removed with the next React release.

The way how RDT defines source has changed in #28471: bundle.js:[lineNumber] is the actual source, because this is what is loaded in the browser, unless you have source maps, which list other sources.

Technically, yes, this is a regression on RDT side, but an expected one, because previously used debugging fields are no longer available (removed from React) for different reasons.

@shreeyansh-mesh
Copy link

Hey @pavel-plehanov, thanks for reporting this.

As I've mentioned in #28544 (comment), this is expected change. In v5.0.0 RDT is using __debugSource field from fiber, which is soon will be removed with the next React release.

The way how RDT defines source has changed in #28471: bundle.js:[lineNumber] is the actual source, because this is what is loaded in the browser, unless you have source maps, which list other sources.

Technically, yes, this is a regression on RDT side, but an expected one, because previously used debugging fields are no longer available (removed from React) for different reasons.

How do I enable sourcemaps in CRA development mode?

@timdelange
Copy link

How would we debug legacy apps? How can we get hold of the older versions to install?

@KinIcy
Copy link

KinIcy commented Mar 18, 2024

How would we debug legacy apps? How can we get hold of the older versions to install?

I followed the instructions here:

https://gist.github.com/juniorcesarabreu/115a4f5141cd1a841119c511c4c66d3f

I will downgrade until there is better support for this feature.

@timdelange
Copy link

After all, the #1 use of this extension is to find the correct file and line to edit in a large project. ATM when you point to a component all you get is chunk.xxxxx.js:2321312

@pavel-plehanov
Copy link
Author

An archive of past versions is available in the Firefox

@gribelu
Copy link

gribelu commented Apr 3, 2024

I can confirm that downgrading to 5.0.0 fixes this issue in Chrome.
The issue is also present in Firefox but I didn't try the downgrade there.

@shamseer-ahammed
Copy link

Any one have any idea why source number is not showing ? for me it displaying like this
image

@imbasri
Copy link

imbasri commented May 14, 2024

thanks for solution.

@kblauhut
Copy link

After all, the #1 use of this extension is to find the correct file and line to edit in a large project. ATM when you point to a component all you get is chunk.xxxxx.js:2321312

I agree, this seems to be main use case for this feature. This was also used by other browser extensions which, up until this point, allowed you to directly navigate to a components code in your editor by clicking on them.
What would the use case of this feature be in its current version? I can't think of why one would want to inspect component code in the browser without being able to edit it. 🫤

Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Aug 16, 2024
Copy link

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Stale Automatically closed due to inactivity Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

9 participants