Not to worry though 🙂 we have a couple of good tools available in our browser itself.
Debugging lightning components – Client Side Set Up
There are different tools available in browsers using which we can debug lightning components –
Google Chrome – Chrome Developer Tools
Mozilla Firefox – Firefox Developer Tools
Safari – Web Inspector
IE – Developer Tools
How to Debug?
Let’s see how to debug a Hello World lightning component.
Lightning Component – demoDebug
There are two ways to debug :
Once your execution hits the breakpoint the code execution gets freezed and will wait for your instructions to move ahead
2. Using Alerts
- Alerts can be used to check whether your code is getting executed as expected or not
- Values of variable can also be printed in alerts