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.
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.
Share Improve this question edited Sep 24, 2021 at 14:10 live-love 52.7k27 gold badges252 silver badges217 bronze badges asked Jun 9, 2016 at 17:21 Robert AltmanRobert Altman 5,5555 gold badges34 silver badges52 bronze badges 4- Chrome for windows is up to version 51.0.2704.84 m, try updating? – fnostro Commented Jun 9, 2016 at 17:23
- 1 When stuff happens like that to me, it is normally a memory issue and restarting the browser usually clears it up. But if you are seeing it on two different browsers that is strange. – epascarello Commented Jun 9, 2016 at 17:36
- Version 51.0.2704.84 m -- same result. – Robert Altman Commented Jun 9, 2016 at 17:37
- Unlikely a memory issue; I also run Chrome on another puter (Mac) connection across network. While Chrome used to be able to display the source; this time there was no visible source after the break point was hit. It is almost as if Chrome lost the ability to show embedded javascript. – Robert Altman Commented Jun 9, 2016 at 17:39
2 Answers
Reset to default 6I 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
If nothing suggested here or in @live-love answer helps, it probably means the aspx page is somehow broken - although not necessarily in a visual way.
Once you fix the issue, the code will appear on devtools as usual.
To give an example from my own experience on how tricky it may be:
Somewhere in my
<script>
code, I mented out this kind of code:// var items = { results: <asp:literal runat="server" id="items" /> };
I haven't noticed that this
Literal
control is still present in thedesigner.cs
fileIn the codebehind, this
Literal
'sText
property was set with a valid json value - but that json value was huge (which is why I mented out the above code in the first place).
Something in the bination of the above bullets seems to have broken the aspx. When the codebehind code was also removed, the aspx code was visible again on devtools.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744959396a4603396.html
评论列表(0条)