Skip to content Skip to sidebar Skip to footer

Typescript Debug Ts Files That Are In Other Project

I have the following situation: A large ASP.NET site that we want to converter to typescript The typescript projects as part of the solution, but in different projects The types

Solution 1:

Yes. You need to enable sourcemaps and then start visual studio debugging with Internet explorer as the browser.

Solution 2:

OK finally I discovered a method to debug ts using the typescript in independent project (as a C# library). The solution was to put the address of the ts files in the map files. to do this, you need to put the following tag in this case in propery group DEBUG in the csproj file.

<TypeScriptSourceMap>true</TypeScriptSourceMap><TypeScriptSourceRoot>http://localhost:37938/</TypeScriptSourceRoot>

Where the address is the address of the library project. Then you can debug from visual studio 2012 using internet explorer, or en Chrome directly using the chrome debug. In chrome remember to be active the map option in configuration debugger. I am using typescript 0.9.5

That is all.

Solution 3:

The accepted answer doesn't work if you're trying to combine shared code with various projects because the merged Source Map file doesn't point to multiple projects by default (so you won't be able to debug the shared code), and I don't think there's a way to do that yet. Please correct me if I'm wrong.

Please see this question/answer indicating what has worked great for both solid code maintenance and debugging in Visual Studio, Chrome, and Firefox, while still retaining the ability to combine shared code with the referencing projects' code (important, for example, if you need to target different ECMAScript versions): Visual Studio: How to debug TypeScript in a shared project using IIS Express and cross-project references (no linking or duplicating files)

Post a Comment for "Typescript Debug Ts Files That Are In Other Project"