Browser Link JavaScript breaks on debugging WebForms project - Expected Identifier
Asked Answered
A

3

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

Antipathetic answered 23/10, 2013 at 21:3 Comment(1)
I've just started getting the same issue with a project that reported no issues with VS2012. The issue only occurs in IE7 and belowNightstick
N
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

Nightstick answered 30/10, 2013 at 9:41 Comment(3)
More info on the feature is here: blogs.msdn.com/b/webdev/archive/2013/06/28/…Nightstick
-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.Antipathetic
@Antipathetic 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 downvotedNightstick
A
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.

Alberic answered 31/10, 2013 at 10:9 Comment(0)
G
0

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

<appSettings>
    <add key ="vs:EnableBrowserLink" value="false"/>
</appSettings>
Genaro answered 10/3, 2017 at 21:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.