Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Browser Link JavaScript breaks on debugging WebForms project - Expected Identifier

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

like image 887
p.campbell Avatar asked Oct 23 '13 21:10

p.campbell


2 Answers

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

like image 168
NathofGod Avatar answered Nov 09 '22 18:11

NathofGod


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

IE doesn't accept reserved javascript words.

like image 24
Naïm Baki Avatar answered Nov 09 '22 20:11

Naïm Baki