have script in a frame:
now I move "debugger" from line 2207 to 2209, save and reload the frame.
Chrome debugger stopped on 2209, but shown source code is outdated.
'Disable cache' on DevTools is checked.
Helps only reloading whole page.
How do I get chrome Dev tools to show the js source correctly??
On top right of DevTools, click the "3 dots" menu and select "Settings". There you may wanna check "Disable cache(while DevTools is open)".
Also, on MacOS you can use at any moment (even with DevTools closed)the shortcut "Command + Shift + R" to force a full refresh of the page.
Related
Chrome (and Canary) used to be able to show javascript source which was embedded in aspx files.
Typically, I would add a debugger; statement, save, and then load my web page in Chrome with the developer tools window open. When Chrome hit the debugger; statement, it would stop and then show the javascript source, so that I could inspect variable or step through code.
A recent change has changed this so that now, when the debugger; statement is executed, Chrome dutifully stops execution but it is unable to show the source.
Does anyone know what has changed; if there are any configuration settings which would re-enable the previous behavior; or how to make this work correctly?
Chrome version: 50.0.2661.102 m (on Windows).
I'm also seeing this in version 53.0.2763.0 canary (64-bit)
I suspect this applies to any kind of embedded script, not just aspx.
I had the same problem. When I clicked on the aspx page, under the Sources tab, I got a blank page.
What worked for me was refreshing the page in Chrome.
After that, the aspx code showed up in Developer Tools, and I was able to see , debug and search the code. This seems to be a Chrome bug.
Chrome Developer tool: html script is blank (in source) debugging tutorial
When I am debugging javascript in Firefox Developer Edition DevTools, and I refresh /reload the page, it just closes the file I had open and starts blank. This is a waste of time.
1) How can I make it perform like Chrome DevTools which preserves the file and exact line location in the file even after reloading?
2) Where are file tabs in firefox debugger tools? It seems there's only a list of ALL files loaded on the page, and I have to hunt down the files one by one after each page reload. Chrome has file tabs in the debugger which persist after reload. Where are tabs in firefox's debugger?
That the wrong file is selected after a page reload is obviously a bug in the Firefox DevTools - which only happens in some cases, btw. - so I've filed this as bug 1283792 .
Support for having multiple files open at the same time is not implemented yet. It is requested (by one of the main DevTools developers) in bug 1097706.
Update:
Opening multiple files at the same time is supported in the reworked debugger UI currently available by setting devtools.debugger.new-debugger-frontend in about:config to true (and enabled by default in Firefox Developer Edition and Nightly).
I have an issue with Chrome.
When the dev tools on Chrome are closed the webpage is loading perfectly, but, when I open the dev tools and refresh the page it shows the 'Aw, snap' page and places a breakpoint on the last line of code.
What may be the cause for this?
Chrome version is 26.0.1410.63.
Thanks :)
My HTML page references a few JavaScript files like:
<script type="text/javascript" src="MyClass.js"></script>
I am debugging with WebStorm using a Python SimpleHTTPServer in Windows with Chrome. I can set breakpoints in my JavaScript and WebStorm stops at them as expected.
However, sometimes when I make changes to my JavaScript and relaunch the debugger, it runs the old code, not the updated code. If I place a breakpoint, the line it stops at is out-of-sync with where I've placed the breakpoint.
How can I force a refresh?
The problem was Chrome (and Firefox) caching JavaScript - maybe this is beyond WebStorm's control. It is solved as follows:
Chrome
F12 to open the developer panel, then right-click Refresh in toolbar -> "Empty cache and hard reload"
or; F12 to open the developer panel, Settings icon bottom right, check "Disable cache"
Firefox
Install Web Developer toolbar, Disable -> "Disable Entire Cache"
or; see this accepted answer
Can we set a breakpoint in javascript(jquery) code in a asp.net MVC 3 view?
I want to debug it because I have to.
I used F12 in IE 9 but no clue.
Visual Studio doesn't play very nicely with javascript debugging, and neither does IE.
Try using Firefox's Script tab in FireBug, you can set breakpoints there and then refresh or reload the page to hit the breakpoint. It allows step by step execution.
Or in chrome, try going to sources, then with the small icon in the top left of the tab, select the script you want to debug. Clicking on one of the line numbers will set a breakpoint for that item. You will notice that when clicking refresh after doing this there are a few options. Any will do, but a normal refresh works to hit the breakpoint.
You can use developer tools of your browser.... just press F12 (chrome, ie)
must set the break points on the js source... and play with your page.
I use chrome... Chrome developer tools tutorial