How to debug Puzzles

From Verge3D Wiki
Jump to navigationJump to search

This short how-to explains how to find and fix bugs in your Puzzles scenarios.

Look for errors in the browser console

If you execute Puzzles incorrectly, e.g. by passing invalid inputs, they will fail to work and print the explanation in the browser console (see here on how to open one).

Use print to console puzzle

Your scenario behaves odd, but there is no errors in the browser console? Just insert the print to console puzzle in the places you need to check with some meaningful data passed as input.

Summary

Ability to find bugs in Puzzles and resolve them quickly is the first skill you should master. Let's repeat the algorithm:

  1. open the browser console and look for errors
  2. insert print to console and carefully read its output