I have breakpoints enabled on chrome dev tools and I have a breakpoint on a line. I know chrome is hitting the line because I put the breakpoint on a line that has the following statement: alert("why is this not breaking")
The breakpoint works if I find the file in the localhost. The breakpoints used to function in the local editor but now they won't. Has anyone else had a similar problem?
I had a similar problem not hitting my breakpoints. Turned out it was because it was a deployed version of the site but the dev tools still had my local dev folder mapped to the workspace, the meant I had the local script files open not the ones on the server. The solution was to close the opened local scripts, opening the right files in the navigator and then setting the breakpoints.
OK I was a bit dumb not realising it in the first place, but this might serve as a good note for anyone else having the same problem as me.
The debugger;
tip in Chrome javascript debugger breakpoints don't do anything? helped me find where my mistake was.
I'm working on a Rails project for the first time, and there were two versions of the file without my knowing it. Rails' "asset pipeline" used a //= require foo
statement to import, and the same foo
file was also included somewhere else.
The debugger;
pointed me to the right place, thankfully.
Should anyone stumble across this later. I have yet to find a definitive answer to this question but these are some other where I have found some helpful info:
Chrome developer tools workspace mappings
Chrome Stable/Canary Dev Tools Issues - Syntax Highlighting Auto-Complete etc
I will continue to update this should I find a real solution
The accepted answer is correct here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With