I'm facing an issue in Typescript debugging and I'm literally getting lost on making breakpoints working.
THE ISSUE:
I'm working on Visual Studio 2017, with the integrated angular-cli app (which is now compatible and does not require a webpack configuration file any more) but if I put a breakpoint on my typescript files, the breakpoint is not being hit.
I've enabled "sourceMap: true" boolean in my tsconfig.json which - in theory - should be the only file that I should edit.
Now my tsconfig.json content is the following:
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"strict": false,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
}
}
I'll glad to share with you more info and more of my code, if needed, but actually you can easily reproduce the issue by simply trying to debug the angular app in visual studio 2017 that is created with the following CMD/PowerShell commands:
dotnet new --install Microsoft.DotNet.Web.Spa.ProjectTemplates::2.0.0
dotnet new angular -o my-new-app
cd my-new-app
cd ClientApp
npm update
THE QUESTION:
Can you explain me what should I exaclty set in order to enable Angular Typescript debug in Visual Studio 2017?
Thanks in advance!
IMPORTANT EDIT
Alternative to Visual Studio ts debug
Looks like that new angular 6+ apps without a webpack.config file make debug possible via chrome webtools.
If you enablesourceMap:true
on tsconfig, you can debug even your .ts files.
Find them under "webpack" code section, as I've read here.
What about Visual Studio?
One of the new Visual Studio updates made possible script debug but is not working with latest angular cli and angular versions yet.
...and What about VS Code?
Thanks to Liebster Kamerad in the comments, you can find how to enable Breakpoints on VS Code here
Keeping the question, hope next updates will solve this somehow