Question

In VS2013 update 2 RC (Typescript 1.0 RTM) I cannot debug TypeScript files in one of my projects. I have traced this back to the map file declaration. By default my JS file contains:

//# sourceMappingURL=general.js.map

Which should be correct, the map file is in the same folder as the TS and JS files. However it doesn't work. if I manually edit the file, specifying the full path, it works:

//# sourceMappingURL=C:/Users/myname/Documents/Visual Studio 2013/Projects/Test/JSLib/general.js.map

This confuses me, because surely the browser shouldn't understand the full path, eg outside the IISExpress web site?

Can anyone suggest a way to get map files working with the first mapping? Thanks

Windows 8.1 x64, IE11

Update: the app, running through IISExpress, uses Windows authentication. if I turn this off the map files load! Also, checking the output window I see:

SourceMap http://localhost:53524/JSLib/general.js.map read failed: The remote server returned an error: (401) Unauthorized.'iexplore.exe' (Script): Loaded 'http://localhost:53524/JSLib/'.

My IIS Express logs contain

2014-04-12 13:58:24 ::1 GET /JSLib/general.js.map - 53524 - ::1 - - 401 2 5 0

But I can browse to http://localhost:53524/JSLib/general.js.map fine in IE. So what's making the call for the map file (VS?) and how to I get it to use my credentials?

Était-ce utile?

La solution

I too have been experiencing this problem. I am sorry to say that I do not know what the root of the problem is. However, I have found a workaround.

Open your project properties and go to the 'TypeScript Build' tab. In the 'Debugging' section, check the 'Specify root directory of the source maps' option and enter the value $(ProjectDir)\Scripts.

This works with Windows Authentication enabled and with the default 'sourceMappingUrl'.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top