How to debug Angular 4 (or 2) with Visual Studio 2015?

I'm following some tutorials to learn Angular 4. I setup my first project with Angular 4 and Visual Studio 2015 Community edition.

This is one example I followed. Example

I put breakpoints and I couldn't debug the code.

I have to use Visual Studio Code to be able to debug Angular 4 in Visual Studio 2015?
I found these Debug 1

and debug 2
LVL 8
CamilliaAsked:
Who is Participating?
 
Julian HansenCommented:
Not sure what the question is?

You would VS Code to do the debuging of angular.
Make sure you start your browser with remote debugging enabled and you don't have any other instances of the browser running that were not started with remote debugging.
0
 
Pawan KumarDatabase ExpertCommented:
0
 
CamilliaAuthor Commented:
You would VS Code to do the debuging of angular

I'm developing in Visual Studio 2015....not in VS Code. So, even tho I'm in VS 2015, I have to do the debugging in VS Code?

Pawan - let me look at your link.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Julian HansenCommented:
Do you want to debug at the JS level or the TypeScript level? If the latter then you need to go with VS Code - I don't think VS is TypeScript aware - I may be wrong but all docs I have read points to VS Code being the TypeScript editor / debugger of choice.
0
 
CamilliaAuthor Commented:
I wanted to step thru the component code.

It's clearer now....VSCode is to debug the TypeScript portion.

I'll read more to get a better understanding.
0
 
Julian HansenCommented:
Just a note on the other post - if you read that it talks about using Source Maps which essentially allow you to reverse the minifying process that is performed as part of the build. This will result in the debugging happening on the JavaScript code - not the TypeScript code - and as the latter is transpiled to the former you are not really going to get anywhere with that method (in my view - personally I have not tried it - I may be barking up the wrong tree here). Just pointing it out.
0
 
CamilliaAuthor Commented:
thanks. Let me read since i'm new to Angular 4.
I got a much better understanding with AngularJS but creating a sample project for myself to learn 4.
0
 
CamilliaAuthor Commented:
I'll play around with VSCode and the other method and read more. Will post if I have other questions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.