0

I have an ASP NET Core application with Angular 2 and Typescript and I am struggling to debug Typescript files in Visual Studio 2015. All my angular 2 files are insire of "wwwroot" directory.

In my tsconfig.json file I have:

{
  "compilerOptions": {
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "module": "commonjs",
    "moduleResolution": "node",
    "noEmitOnError": false,
    "noImplicitAny": false,
    "removeComments": false,
    "sourceMap": true,
    "target": "es5"
  },
  "exclude": [
    "node_modules/**/*.d.ts",
    "wwwroot",
    "typings/main",
    "typings/main.d.ts"
  ]
}

I have all the .map files and js files generated in the file system and I can see them in my solution but when I start debugging Visual Studio with Internet Explorer but says that "No symbols have been loaded for this document."

I have created a simple project only with .NET Core and simple typescript file. Following this guide: https://www.typescriptlang.org/docs/handbook/asp-net-core.html

Here is the code on git: https://github.com/andrenpt/TypeScriptDebug

Still the break-point is not hit in VS2015

Does anyone have any suggestion?

legollas007
  • 193
  • 2
  • 12
  • Did you check here http://stackoverflow.com/questions/28834065/how-to-debug-typescript-in-visual-studio-2015-asp-net-5? – Ilya Chernomordik Oct 27 '16 at 16:16
  • Yes I have read that before. Can't use some of the suggestions as they are for ASP .NET 5 and I do not have those options in an ASP NET Core project. Tried to use `"inlineSourceMap": true, "inlineSources": true` but it didn't worked. – legollas007 Oct 27 '16 at 16:41
  • ASP.NET 5 is the old name for ASP.NET Core, though perhaps they changes more than just a name with this regard :) – Ilya Chernomordik Oct 27 '16 at 16:44
  • If you go to a ASP.NET Core project properties you cannot _Disable all debuggers_ like they suggest to do in that question/link. That is what I mean for it's different. Thanks – legollas007 Oct 27 '16 at 16:47
  • By the way, just to mention: typescript debugging seem to work in Chrome if you have all the source maps in order. – Ilya Chernomordik Oct 27 '16 at 17:02
  • But what I really wanted is to debug in VS2015. I have updated my question with a simple example using typescript. Even with that simple example the break-point is never hit...I really wanted to understand what I am doing wrong. – legollas007 Oct 27 '16 at 20:23

0 Answers0