So in Visual studio code (vs code) we have many options to debug
1- Using debugger keywork in code
Put “debugger;” in the place where you want to pause the execution and it will pop up in the chrome developer tool
2- Best way is to install debugger extension:
Installing debugger for chrome in vs code will do the same but without have to write any code for debugging .