livereactload
livereactload copied to clipboard
Breakpoints not hitting in Chrome
Thanks for making this, it's going to make life so much easier once it's all setup!
Having integrated this into my gulp process I'm finding that none of my breakpoints hit in chrome (prior to any patching). Weirdly enough this all seems fine in Firefox.
Any guidance would be greatly appreciated.
Chrome was just having a hissy fit it seems :)
This issue appears to be present in latest release - I can set breakpoints but they are never hit. I'm using the example here https://github.com/milankinen/livereactload/tree/master/examples/03-build-systems
UPDATE: Breakpoints are hit in Firefox
Hi @kyle-ssg & @itsravenous!
Have you noticed that LiveReactload suffixes reloaded script files with rev=<revision_num>
(please see e.g. #141)? Unfortunately (at least) Chrome treats the suffixed files as separate scripts so breakpoints from the old revision don't propagate to the next one. 😕
If anyone knows solutions to this issue, all help is welcome!
@milankinen thanks for the swift response! I saw the rev= issue initially, but it goes away after first refresh (yep, super weird I know) and Chrome shows my breakpoints persisting on reload; they just aren't getting hit!
Wait, I lied :D Yes, when I make an edit to a component, a rev=<revision_number>
is added, so yes, Chrome sees it as a different file. But that's a separate issue, which I'll open now (#147)
If I add a debugger
statement in my code, Chrome pauses on that, and any subsequent breakpoints are also hit. So I can work around this for now when I need to debug, but I hope someone with debugger smarts can figure it out!
OK, so breakpoints that should be hit when the page is [re]loaded aren't hit, but if I place a breakpoint in the render()
function of a component then it will get hit when the component re-renders (because of state change or whatever). So not as bad as I initially thought.
Can you try again with 3.3.0 please?