Giter Club home page Giter Club logo

Comments (9)

raythree avatar raythree commented on July 16, 2024 3

I just came across this because I was having the same issue. This setting worked fixed the issue:

devtool: '#inline-source-map'

from react-slingshot.

coryhouse avatar coryhouse commented on July 16, 2024 2

I just confirmed the production build honors breakpoints just fine, so this is indeed related to the webpack devtool setting. The prod build uses source-map which works fine. The issue is: eval-source-map doesn't hit breakpoints on load. I've confirmed switching the devtool setting to eval for dev work fixes this bug. Per the docs, eval also runs faster: https://webpack.github.io/docs/configuration.html#devtool

I'll consider switching this setting tomorrow.

from react-slingshot.

coryhouse avatar coryhouse commented on July 16, 2024

As you can see, it works for me. Can you try setting a breakpoint on this same spot I'm hitting in my screenshot and see if it sticks? Be sure to note that I'm setting a breakpoint on the file under webpack://

screen shot 2016-01-12 at 4 41 33 pm

from react-slingshot.

nhalloran avatar nhalloran commented on July 16, 2024

Thank you so much for the help. It must be something on my end. Here I try to break on that same line, with no luck.

screen shot 2016-01-12 at 5 54 17 pm

from react-slingshot.

nickytonline avatar nickytonline commented on July 16, 2024

@nhalloran it works for me too. Sometimes a hard reload in Chrome does the trick. Also ensure that caching is disabled when Chrome dev tools are open.

from react-slingshot.

nhalloran avatar nhalloran commented on July 16, 2024

Oh!!
I should also say that I am looking to break during the initial load. I do get a break on that line when I edit the form, triggering the action. I do not get a break on lines of code that run during the init, for example:
screen shot 2016-01-12 at 6 00 25 pm

from react-slingshot.

coryhouse avatar coryhouse commented on July 16, 2024

Yes, I can confirm that break points aren't getting hit on initial page load. Perhaps a different source-map setting in Webpack will resolve that. Another simple approach: Just type debugger and it'll hit that breakpoint on load just fine.

from react-slingshot.

nhalloran avatar nhalloran commented on July 16, 2024

Good to know. The debugger command is a great workaround. Thanks!

Also note that I tested it with the official redux examples, i.e.
https://github.com/rackt/redux/tree/master/examples/counter
...and the behavior is the same, so it's clearly a pretty general "issue" - perhaps not necessary to track here.

Thanks again - building my app on this!

from react-slingshot.

coryhouse avatar coryhouse commented on July 16, 2024

Given your comment, I'm going to leave the debugger setting as is for now and close this issue. The eval devtool supports breakpoints on load, but provides a less useful debugging experience otherwise. So I don't see any good changes to make. Thankfully, debugger effectively works around the admitted quirk. Thanks!

from react-slingshot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.