How can you see the call stack of a certain function? How can you stop the app from continuing to run in case a certain code is running?
Now, if we wish to place a breakpoint…in a certain location, we just click…the line number on the left.…So for example, if I wish to add a breakpoint…in the lives-- command, I click here.…As you can see on the right, the breakpoint…has been added to the list of breakpoints.…If I click other lines as well,…you can see that they are all added.…But we'll stick with just one breakpoint,…in line 110 lives--.…
Take notice that in your certain version of the code…it may not be line 110, so we look for lives--…in the loseLife function.…Now, after we place the breakpoint,…we can run the game…and reach the point where we lose life.…
Note: This course was created by Packt Publishing. We are pleased to host this training in our library.
- Playing sounds in various browsers using SoundJS
- Tweening objects using TweenJS
- Creating graphic assets and basic animations
- Game stage creation and object positioning
- Adding the basic game logic
- Add the game physics
- Adding mouse and keyboard controls
- Debugging with breakpoints in Chrome
- Debugging on Android and iOS
- Character movement and input handling