3

Is it possible to debug the source js files in IE 11 in a create-react-app project?

I have no problem doing this in chrome - but in IE11 I only have access to the bundle.js . In chrome it seems it knows how to use the source maps. I'd prefer to do this without having to eject.

Ryan
  • 449
  • 5
  • 21
  • 1
    It looks like you can get the React devtools as a standalone app, not just as an extension to Chrome - see here: https://github.com/facebook/react-devtools/tree/master/packages/react-devtools – Robin Zigmond Sep 11 '18 at 19:42
  • Can you breakpoint on source files through that? Looks like just a react dom inspector – Ryan Sep 11 '18 at 20:55
  • 1
    Yes, that's basically what it is - and it lets you view the values of your props and state of all components at any point, which can be very useful. (NB I've not used it, although I have used the Chrome browser extension.) As for breakpoints, can you not just do it the usual way, with the `debugger` statement in your source files? (Or are these removed when it's compiled?) Not sure if I'm missing something specific you want to be able to do. Sorry if this isn't helpful, React is only something I've played with a little, I've never used it "seriously". – Robin Zigmond Sep 11 '18 at 21:00
  • Ok thanks I'll give it a try . I have no problem using debugger statement or just opening the chrome dev tools - but I am trying to do this in an older version of internet explorer (IE) and I think our version of IE11 doesn't allow source maps that take the bundled or minified files back to an unbundled state. Therefore a debugger statement will just break on the bundled and incoherent js code - not my source react code. – Ryan Sep 11 '18 at 22:35
  • @Ryan Did you ever get this to work? I have a similar need, however, I can't get the dev tool to hook into Internet Explorer. – RLH Jun 10 '19 at 14:29
  • Have you tried the standalone devtools Robin posted? I don't think I ever tried it. – Ryan Jun 12 '19 at 23:19

0 Answers0