SLaks/Ref12

F12 will jump to write file, but not the right line (Chrome 34)

Closed this issue · 2 comments

I'm not sure if this is something on my machine related to other plugins/Chrome extensions, but I would like to point it out here since I have this consistently.

When I press F12 on any valid symbol the browser (Chrome 34) will load the right file, but won't jump to the right line. The URL ends up being something like: http://referencesource.microsoft.com/mscorlib/system/datetime.cs.html#http://referencesource.microsoft.com/mscorlib/system/datetime.cs.html#df6b1eba7461813b
The issue seems to be related to the loading of the left side menu.

When I manually enter the corect URL in IE (http://referencesource.microsoft.com/mscorlib/system/datetime.cs.html#df6b1eba7461813b) it loads up the page, loads the left side menu, and highlight the correct part.

In Chrome it doesn't load the left side menu (at all for me really), but instead seems to do a navigation/redirect which prepends the base URL again.

I basically have 2 questions here:

  • Does this work correctly for others in Chrome?
  • Would it be possible to add a setting to Ref12 where the user can choose what browser is used?

I can't reproduce that.

What happens if you enter the correct URL in Chrome directly? Is the problem in the URL that Ref12 generates or the way Chrome loads it?
If the former, what version of VS, and do you have the Roslyn Preview installed?

I had a colleague run the URL on his machine and it happened for him too.
After a bit of testing it turned out the left side menu is loaded in dynamically in a way that makes AdBlock unhappy, which then blocks any javascript from scrolling the page to the right line and highlighting the references.
I added an exception to AdBlock and now it works as it should.
It appears to be something in a recent AdBlock/Chrome update that broke this, since it was working for me few weeks ago.

In short: If anyone has something similar, it might be AdBlock doing it's thing.