2

I am unable to debug a TypeScript file in VS2015 when the file is loaded using System.import.

jspm.io/[email protected] doesn't even load the map file; jspm.io/[email protected] does load the map file; in either case, I still cannot get a breakpoint in VS2015 to stick.

FYI: I'm also using github.jspm.io/jmcriffey/[email protected]/traceur-runtime.js - and I've also tried version 0.0.91.

If anybody has got this working in a VS2015 MVC project, I'd love to hear from you. Thanks!

2 Answers 2

0

In Visual Studio, right click your project, in the TypeScript Build tab, and check the setting of Output, Debugging and General options. If it is project solution, you can add and build TypeScript file. If it is web site(asp.net web form site) project, you need use this workaround to add and build TypeScript fle

Sign up to request clarification or add additional context in comments.

3 Comments

Angie, I have no problem with using and debugging TypeScript in my application when using the normal script tags for loading the ts files. My problem is with ts files loaded with System.import.
Thanks for your feedback. I don't think this issue is related to System.import. As I mentioned above, we can't add typescript file to web site project(web form/MVC project), you need use the workaround above.
I agree with Bonneville. I can create a totally new HTML TypeScript project and have debugging working, then I just switch from loading the generated js file from <script src="app.js"></script> to <script>System.import('app')</script> (after having added the systemjs loader of course) and after that although the code works, no breakpoints is reached anymore in the ts file. So the problem is definitely when using systemjs.
0

When googling a bit I fount that this is actually a known problem, uncertain if it is a problem in systemjs or IE. Seems that switching to require.js works for some people but I have not personally tried it.

https://github.com/systemjs/systemjs/issues/450

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.