mikha
asked on
how to debug angular code ?
I am learning angularjs , and have mostly worked in .net space.
what are few ways/tools/tips/tricks to debug angular code?
what are few ways/tools/tips/tricks to debug angular code?
In principle you you google chrome dev tools (Press F12) to debug using:
- Elements: To inspect HTML
- Console tab: IT will display any errors/warnings and log messages.
- Sources: Set breakpoints and debug
But as a tool your are better off using Visual Studio Code. (It is free download and add an Angular extension to customise the IDE to Angular)
It is simpler than VS2017 but it is the tool of choice for front end development..
- Elements: To inspect HTML
- Console tab: IT will display any errors/warnings and log messages.
- Sources: Set breakpoints and debug
But as a tool your are better off using Visual Studio Code. (It is free download and add an Angular extension to customise the IDE to Angular)
It is simpler than VS2017 but it is the tool of choice for front end development..
ASKER
@leakim971 & @Miguel - thanks both for your comments.
@Miguel - I have used visual studio so far. with visual studio code, is it possible to set up the break points or do attach to process , similar to visual studio. how do you start debugging with visual studio code?
@Miguel - I have used visual studio so far. with visual studio code, is it possible to set up the break points or do attach to process , similar to visual studio. how do you start debugging with visual studio code?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
this amazing extension was not up2date, give a try : https://chrome.google.com/webstore/detail/angularjs-batarang/ighdmehidhipcmcojjgiloacoafjmpfk
you're supposed to create testing units : https://docs.angularjs.org/guide/unit-testing
but as I'm a bad programmer I never used it