0

Debugging Angular or JS file

Does anyone know or has an idea on debugging angular or javascripts. Thank you!

9th Dec 2020, 3:52 AM
Aaron Sardenia
Aaron Sardenia - avatar
4 Réponses
+ 9
You can use any browser!
9th Dec 2020, 5:15 AM
Piyush
Piyush - avatar
+ 1
You can debug the js or angular file using the 'debugger;' Just write this debugger text in the js file anywhere like:- Example:- function add(){ debugger; } And now run the program and in the browser -> right-click -> inspect And when this function is called then the debugger will activate. You can also use the console. log(); Example:- function add(){ int a = 5; int b = 5; int c = a+b; console.log(c); } browser -> right-click -> inspect -> console And you can see the result. Hope you get it.
9th Dec 2020, 4:08 AM
Shaili Shah
Shaili Shah - avatar
0
you can debug js through browser
9th Dec 2020, 4:06 AM
Shahghasi Adil
Shahghasi Adil - avatar
0
Thank you Shaili this is very helpful. I was thinking to debug it via vs code, but I think this will do.
9th Dec 2020, 4:21 AM
Aaron