Reputation: 339
Since few days, debugger does not work anymore. I've tried several things without success.
In Visual studio at the place of the breakpoint I've got: 'The breakpoint will not currently be hit. No symbols have been loaded for this document'
Any help?
How IE load the symbols? I assume it's related to the source map ...
Thank in advance
Richard
Upvotes: 7
Views: 12621
Reputation: 185
In my case the answer was that another script file was actually used by the html. Once this was fixed, breakpoints started working, of course.
Upvotes: 1
Reputation: 339
Here is the answer (of my question ... with the help of WiredPrairie, ... ;-) )
This line
<Import Project="$(VSToolsPath)\TypeScript\Microsoft.TypeScript.targets" Condition="'$(BuildingInsideVisualStudio)' == 'true'" />
was preceeding my lines
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<TypeScriptTarget>ES5</TypeScriptTarget>
<TypeScriptRemoveComments>true</TypeScriptRemoveComments>
<TypeScriptSourceMap>true</TypeScriptSourceMap>
<TypeScriptModuleKind>AMD</TypeScriptModuleKind>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<TypeScriptTarget>ES5</TypeScriptTarget>
<TypeScriptRemoveComments>true</TypeScriptRemoveComments>
<TypeScriptSourceMap>true</TypeScriptSourceMap>
<TypeScriptModuleKind>AMD</TypeScriptModuleKind>
</PropertyGroup>
So I put it AFTER ( what a smart guys, isn't it ;-) ) in my *.csproj
I found the problem because:
The //# sourceMappingURL=/path/to/file.js.map
was generated at the end of the *.js files when saving, not when compiling.
The build output was saying The TypeScript Compiler was given an empty configurations string, which is unusual and suspicious.
.
The solution comes from this post: TypeScript Compiler was given an empty configurations string.
The root cause of the problem appears when I tried to deploy my project to Azure. The js files were not uploaded/compiled, so i've added this tricky line in the csproj bad luck :-(
Thank and I hope it will help others.
Upvotes: 1
Reputation: 5376
The following is for people who are using Chrome or Firefox for the environment...
Apparently you just simply can't get it to work with VS but not all is lost as the author of this article shows. Hope it helps some more struggles to get debugging :)
Upvotes: 1
Reputation: 21
I had a similar problem, but with Visual Studio 2013. No breakpoints were hit, even though I was running in debug mode and with source maps generated.
I found out that after I included the compiled .js files in the project, my breakpoints in TypeScript started hitting.
Upvotes: 2