8

Upon debugging an ASP.NET WebForms project, I'm shown an error dialog in Visual Studio 2013.

The Browser Link feature includes a handful of pre-generated or runtime-generated JavaScript.

JavaScript critical error at line xyz column abc in http://local.host/foo/browserLink\n\nSCRIPT1010:

Expected Identifier

This is on setting the line label.for = id;

How can I avoid this error?

  • Visual Studio 2013 Ultimate
  • IE 11
  • Windows 8.1 Pro

enter image description here

Charles
  • 50,943
  • 13
  • 104
  • 142
p.campbell
  • 98,673
  • 67
  • 256
  • 322
  • I've just started getting the same issue with a project that reported no issues with VS2012. The issue only occurs in IE7 and below – NathofGod Oct 30 '13 at 09:38

3 Answers3

11

You'll find the problem is the new Browser link feature.

You can disable it, it solved my issue with IE7 and below when debugging.

Browser Link Menu

NathofGod
  • 479
  • 5
  • 12
  • More info on the feature is here: http://blogs.msdn.com/b/webdev/archive/2013/06/28/browser-link-feature-in-visual-studio-preview-2013.aspx – NathofGod Oct 30 '13 at 09:43
  • 2
    -1 downvote. This answer as it stands adds no new information. I literally created the tag for Browser Link. The title of the question literally starts with "Browser Link". Disabling BL doesn't solve the problem. – p.campbell Oct 30 '13 at 15:52
  • @p.campbell This clearly shows how to disable the Browser Link and solve the issue. There are no other accepted answers and your post does not describe how the issue is fixed!!! This should not be downvoted – NathofGod Mar 05 '14 at 12:32
1

for is a reserved word. You either have to choose another name or do label["for"] = id;

IE doesn't accept reserved javascript words.

Naïm Baki
  • 197
  • 6
0

Adding the entry below to web.config resolved the issue for me.

<appSettings>
    <add key ="vs:EnableBrowserLink" value="false"/>
</appSettings>