At this point, if you have experience using the Chrome DevTools, you are good to start debugging. Of course, if this is all relatively new to you, follow the given steps to learn how to debug in DevTools:
- Switch your view to the Chrome window we opened in the last section.
- Click on the Sources tab of the DevTools window.
- Select spawn-at-camera.html or the one you used in your testing.
- Scroll down through the HTML and JavaScript until you see the onClick() function.
- Click on the line number 229 (229 in the example, but yours may differ), just left of the highlighted code to set a break point. This is also demonstrated in the following excerpt:
Setting a JavaScript break point
- Switch back to the device that is running ...