So, when the page is loaded we click F12 to display developers tools panel. We can see our error message there and by clicking error message we can get right to the line of code that causes the trouble. Error message in popup says: 'ctrlprice is not defined'. Replacing ctrlprice with correct ctrlPrice fixes the issue.
Let's take a look at another example where we are calculating amount on the fly and are not getting the anticipated result. We are calculating the order by multiplying the number of units in the order by the price of the unit and adding a tax to the equation.
And here is the result it produces:
Once breakpoint is inserted put cursor to Quantity field and hit any arrow key on the keyboard. Program execution stops and we can see what's going on. We can use F10 key to move to the next line of code (Step over).
Now lets add a few watch expressions on the right side. We can see that total and tax are calculated properly however we multiplying them instead of adding up which causes the error. A simple correction in the equation logic solves the issue.
You can also watch a video version of this tutorial.