O'Reilly logo

JavaScript Testing by Liang Yuxian Eugene

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action—debugging with Opera Dragonfly

  1. In this section, we'll learn how to use the debugging facilities of the Dragonfly. We'll start by setting breakpoints.

    Here's how we can set a breakpoint in Dragonfly:

  2. With sample.html opened in Opera, start Dragonfly and click on the Scripts tabbed page. You can set a breakpoint by clicking on the line number at which we want to set our breakpoint. Let us try going to the line that contains buildContent(answerB, "minus"); and then clicking on the line number.
  3. Go to your browser and execute example.html. Enter 5 and 3 as the inputs. Click on Submit. As usual, you will not see any content being created dynamically. The program's breakpoint is at contains buildContent(answerB, "minus");.
  4. Now go back to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required