I cannot get breakpoints to work on my TypeScript files inside visual studio.
When I run in debug mode the breakpoint is disabled and on hovering over it I see the error message:
The breakpoint will not currently be hit. No symbols have been loaded for this document
I have Googled around the issue and I am aware of a couple of other SO questions with similar symptoms but my issue is not a duplicate of either of the ones I have found:
I can see nothing untoward in the build output either.
How can I get TypeScript breakpoints to work inside Visual Studio?
Version info:
My Options > Debugging > Symbol Settings:
TypeScript is a superset of typed JavaScript (optional) that can help build and manage large-scale JavaScript projects. It can be considered JavaScript with additional features like strong static typing, compilation, and object-oriented programming.
Advantages of using TypeScript over JavaScript TypeScript always points out the compilation errors at the time of development (pre-compilation). Because of this getting runtime errors is less likely, whereas JavaScript is an interpreted language. TypeScript supports static/strong typing.
TypeScript is an object-oriented programming language developed by Microsoft Corporation, whereas JavaScript is the programming language for the web. TypeScript is an open-source language to build large-scale web apps, whereas JavaScript is a server-side programming language that helps to develop interactive web pages.
We frequently see the question “Should I learn JavaScript or TypeScript? “. The answer is that you can't learn TypeScript without learning JavaScript! TypeScript shares syntax and runtime behavior with JavaScript, so anything you learn about JavaScript is helping you learn TypeScript at the same time.
First thing to do is to make sure that TypeScript build is generating source maps. This setting is under the project properties TypeScriptBuild settings (see below):
Next, be sure to select a supported browser for debugging script on launch. The only ones I know that are supported are Internet Explorer and Edge - with caveats.
Verify that the debugger is, in fact, attached to the web browser by checking the processes window (ctl-alt + z) for the browser process and that script is under the Debugging column.
If, after verifying that the debugger is attached to the web browser, breakpoints are still not binding in your .ts file, open the .js files generated by the TypeScript compiler and set breakpoints there.
Another option is to use the built-in browser debugger for the browser of your choosing. See this page for details.
I had the same problem. For me, it was the fact that I did not have "meta" defined in my System.config.
If you follow the "ASP.NET 5 Template" section in this article, it should fix your problem.
http://www.codeproject.com/Articles/1087605/Angular-typescript-configuration-and-debugging-for
Good Luck.
I had the same problem as well and was able to fix it by moving the source file to another directory. I was able to set breakpoints in the main typescript file, but unable to set breakpoints in the subordinate typescript react file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With