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

Enable soucemaps while run 'yarn debug-test' #16008

Closed
wants to merge 1 commit into from

Conversation

flyOstrich
Copy link

@flyOstrich flyOstrich commented Jun 27, 2019

the question is :
when i ran 'yarn debug-test' and debug from chrome://inspect , i got minified codes like this:
it('should return the only child', function () { var instance = React.createElement(WrapComponent, { __source: { fileName: _jsxFileName, lineNumber: 70 } }, React.createElement('span', { __source: { fileName: _jsxFileName, lineNumber: 71 } })); expect(React.Children.only(instance.props.children)).toEqual(React.createElement('span', { __source: { fileName: _jsxFileName, lineNumber: 74 } })); });
actually,i want to get source code when i debug test , so i added sourceMaps:"inline" to enable this feature

@sizebot
Copy link

sizebot commented Jun 27, 2019

No significant bundle size changes to report.

Generated by 🚫 dangerJS

@zzuu666
Copy link

zzuu666 commented Jul 4, 2019

This PR is useful. When I run yarn debug-test and wanna debug ReactDOM.render(<div />, container). but I got an error position in source code.
I added same code as this PR, my problem is solved.

Debug runtime env:
node: 10.15.1
yarn: 1.15.2
babel/*: 7.x

@gaearon
Copy link
Collaborator

gaearon commented Jul 26, 2019

Can you add screenshots? I tried this and still got garbled code.

@zzuu666
Copy link

zzuu666 commented Jul 28, 2019

This is my test debug code:
break-point

without sourceMap: inline, I don't get the correct position:
without

with sourceMap: inline, It's working:
with

@stale
Copy link

stale bot commented Jan 10, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution.

@stale stale bot added the Resolution: Stale Automatically closed due to inactivity label Jan 10, 2020
@stale
Copy link

stale bot commented Jan 17, 2020

Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Resolution: Stale Automatically closed due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants