As most kids seem to be kept away from the court when child custody issues are decided, what is the child’s opinion worth?

Case law provides that a child’s desire is always important, but when a child reach 12 years and over, his opinion is determinant. Therefore, unless very few exceptions, a teenager may literally decide the parent with whom he wants to live. 

However, it is generally inappropriate to make a child testify before the court or even to make him implicated in the legal proceedings: the usage is rather to appoint an independent attorney for the child who will meet the latter and report his wishes in court.