Chrome Developer Tools places breakpoint at incorrect location - google-chrome

I'm working on debugging the script of a page I visit (I'm looking to modify its functionality with Tampermonkey) and I am trying to set breakpoints on some code. This code was minified, so I clicked the "prettify" button and now I can use a formatted version of it instead for debugging.
The first breakpoint was able to be set at the right line, but the next would not stick and would instead appear about a hundred lines further down. This seems to be a bug that has been plaguing Chrome Developer Tools for a while and complaints keep on popping up about it. How can I get it to set breakpoints where I want them to be set?
ETA: The breakpoint goes back to the right place when it is DISABLED, then goes back to the wrong when it is re-enabled.

Minifiers apply various optimizations on your code, such as combining concatenated statements into a single expression using the Comma Operator. If you try to break in the middle of that expression, the debugger will jump to the next statement instead. See the example below from a script on this page.
There is some discussion on implementing sub-expression breakpoints into V8 here, but this hasn't been implemented as of yet.

Related

Browsers inserting line breaks where HTML code has none

Screenshot of webpage, Chrome devtools inspection info, and source code
I have a Wordpress site where, for no reason I can find, the text caption under the graphics is being displayed in the browser as two or more lines, even though there's no line break specified in the source code.
As you can see in the screenshot, when I inspect it with Chrome, the console shows a line break in the code before and after the A tag, as well as two quotation marks around the first "line" that don't appear in the browser's render. However, when viewing the source code in Notepad, neither the line breaks nor the quotation marks are there.
The rendered page, with the erroneous line break, appears the same in Chrome, Firefox, and Edge (the last of which has no add-ons installed). This is all on Windows 10. Firefox's inspection panel shows the line breaks in the code, but not the quotation marks.
The page in the screenshot is behind a paywall, but you can see an identical situation at this link [now-obsolete link redacted]. In fact, it appears to be happening on other pages of the site too, for example this one [now-obsolete link redacted], where you can see an even more extreme example of a line break being inserted before and after every link. This started recently - all of these captions appeared normal, as if only a single line, a couple weeks ago at most.
I am totally stumped. What on earth is going on here? Is this somehow the doing of a WordPress theme/plugin? I could try disabling them all, but even if that fixes it, I'm still dying to know what it means for something to show up as multiple lines in the devtools inspector (and in the rendered output) but not in the actual source code.
The problem was that the A tag had the display: block property applied to it. Thanks to #MuhammadZohaib for the quick reply!
This was entirely my own doing - I had added a rule in the stylesheet making A tags in the caption container tables display as blocks as a way to fix some weird display results on the linked graphics themselves, and didn't realize I had allowed it to apply to the A tags in the actual caption text as well (in fact, I had almost completely forgotten about it).
Apparently the A tag still displays on a separate line in the devtools inspector's code display, but that's fine with me as long as the end users don't see it. Still no idea why Chrome's inspector is showing quotation marks around the first sentence (they're still there even after a hard refresh), but that's also apparently not a problem.

Why some actions appear bold in Construct 2?

I am trying to get started with Construct 2 and notice that some actions appear in bold (Visible and Invisible in the screenshot below). What does it mean? Also, it seems like the last one only does so.
PS - It seems that it only happens for events related to buttons (?).
Well I'm not sure about that, but it seems that buttons manipulate the visible/invisible property different, like it's not a native feature.
So I would check the possibility of visible and invisible acting like instance variables for buttons. I will investigate further when I am on my Windows PC and get back to you.

show console tab instead of drawer on errors in Chrome Developer Tools

This is a minor annoyance but I can't seem to find any solution.
I don't really like the console "drawer" (the console you see when you hit "Esc") and prefer to use the tab/page as I don't have a lot of space to devote to the developer tools. When you load a page with errors or warnings there's little icons on the far right that indicate counts of each, but when you click on that it always opens the "drawer" version of the console instead of the tab/page version. Is there any way to change this? (I vaguely recall that it used to always open the tab/page version before)
No, there is no way to customize such behavior. One thing you could do to slightly speed up things is to re-arrange panels in DevTools so that it is easier for you to get into "Console".

SSRS 2008 R2 creating random blank pages on report?

hoping someone can help.
my report in SSRS 2008 R2 is randomly creating a blank page on the rendered report (and when it's exported to Word). I've investigated it here and Google and tried everything that's been suggested.
My Page Setup under Report Properties is Letter (portrait) 8.5in x 11in, with 0 for all 4 of the margins (I've tried using .25in for all 4, same results).
the size of the body, etc. on the report is 8in x 3.3094 -- nothing is over 8in in width.
"Keep together on one page if possible" is unchecked for all the elements on the report (Lists, tables, body). It produces the same result if it is checked, too.
The ConsumeContainerWhiteSpace on the report is set to TRUE.
Again, when it's rendered on the web browser, I have 6 pages that are fine, then a blank, then several more single pages, then another blank.
Oddy enough, when I view it (on the development machine, not on the web) in PRINT mode, there are no blank pages at all (which is good).
can anyone help?
thanks!
It really sounds like some element is just over the edge of the margin and is creating that blank page. Since it doesn't appear after every page is there any common element that is present on the page before the blank ones that might be near the edge?
I think the HTML renderer must have slightly different margins (or something) when compared to the print renderer in SSDT. Unfortunately for these kinds of issues in SSRS the best way to solve it is to go through all of the possible offending report elements and make sure that they aren't going over the edge.
I'd recommend just moving EVERYTHING away from the right margin and seeing if it fixes it, and then moving things back one by one to figure out where the problem is. Either that or you can make the report margins smaller and see if that fixes it. Even if you need to revert them afterwards and still find the offending element, it could be a good way to test what the problem is.
This could also be caused by an element in the report having the "Insert Page Break Before/After" option enabled. You should check the elements that appear before/after the page break to ensure that option is not set. However, since the issue doesn't happen in all rendering modes I don't think this is the most likely issue.
Figured it out. I clicked on the down arrow on the Row Group, picked Group Properties, and unchecked the Page Break Options/Between Each Instance of a Group and there's no more blank pages :)
thanks for everyone's help!

Page quickly reformats itself mostly in Chrome

After some changes to our site, we are seeing that when certain pages are loaded, the page quickly changes width. This occurs every time on webkit browsers Chrome and Safair, but only rarely on some other browsers.
I have not been able to produce the effect at all on Firefox on Windows, Firefox on Mac, nor IE9 and IE11. It seems to rarely occur on IE8 and IE10. I have not found a pattern yet that causes it to appear on IE8 and IE10.
To understand what might be causing this, it would be good to know if certain styling attributes take an initial value while the page is loading but them assume some other value by the time the page is fully loaded. This could explain what is happening.
I should add that this problem developed after some changes which "should" not have caused this issue. Basically having to do with adding URL rewriting to eliminate duplicate pages. Clearly some side effect is operative.
At the moment we only have the code on development servers, so it would not be that easy to actually see it right now, although that is the obvious first question from a responder. So at this point, the question is more "what generically causes pages to reformat under Webkit."
UPDATE: the problem seems to be traced to Google Translate. When I remove that from the page, the problem goes away. Put it back; problem comes back.
Oddly, it mostly impacts Chrome! IE10 and 11 are exempt, and with even earlier IE versions the problem is much less.
I can readily demonstrate the temporary widening of the page just by reloading the page.
I experimented with trying to put the div containing the translate div instead a container div and setting some attributes on that. So far I have not found something that mitigates the problem.
We have suppressed Google Translate recently because it started adding other junk to the bottom of the page. That other junk is gone but we will continue to suppress it due to this new jumpiness.
I believe there is some clever way to contain the issue, but have no more time for it.
I have confirmed that the issue is definitely caused by Google Translate being on the page.