The interpretation of legislation can, on rare occasions, be assisted by reference to information about the creation of that legislation. Even so, there is reluctance to have resort to such material, as can be seen from R v JBT  UKHL 20 (29 April 2009).
Here there was statutory ambiguity. Until the ambiguity was pointed out, almost everyone had thought the age of criminal responsibility had been made 10 years or more, by s 34 of the Crime and Disorder Act 1998[UK]:
"Abolition of rebuttable presumption that a child is doli incapax
The rebuttable presumption of criminal law that a child aged 10 or over is incapable of committing an offence is hereby abolished."
Very good. Charge the little buggers.
But did abolition of the presumption of incapacity mean that the defence was also abolished: couldn't the child adduce evidence to prove "I was too immature to understand that what I did was seriously wrong"?
Lord Phillips felt that the statute did not provide sufficient assistance to determine this issue, so he canvassed the history of the common law from Hale (1778 ed) through the legislation and the progress of the current provision through Parliament.
The other Law Lords concurred, but adding that they wouldn't have referred to Hansard. Lord Phillips had found Hansard helpful, for an amendment which addressed the issue unambiguously had been withdrawn in the Lords once and later, when reintroduced, had been defeated. That amendment, moved by Lord Goddard QC, was based on the assumption that the Bill in question was designed to abolish doli incapax completely (both as rule and presumption).
Lord Rodger did not explain how he would have reached the same result as did Lord Phillips without reference to Hansard, but he agreed that the passages referred to put the position beyond doubt. Lord Carswell would have got there by "construction of the section and taking account of the mischief and of the consequences of the legislation" (39), but he also felt that this was a legitimate case in which to take into account the Parliamentary materials, recognising the change in approach to such that was effected in Pepper v Hart  AC 593. Lord Brown agreed that the reference to Lord Goddard QC's proposed amendment was helpful, and he mentioned the use of reference to unsuccessful amendments by Lord Nicholls in R (Jackson) v Attorney General  1 AC 262, 292. Lord Mance agreed with everyone.
In New Zealand there have been proposals to formalise reference to Parliamentary materials as aids to interpretation of legislation, but these have not been included in the current Interpretation Act 1999. The governing provision is s 5:
"Ascertaining meaning of legislation
(1) The meaning of an enactment must be ascertained from its text and in the light of its purpose.
(2) The matters that may be considered in ascertaining the meaning of an enactment include the indications provided in the enactment.
(3) Examples of those indications are preambles, the analysis, a table of contents, headings to Parts and sections, marginal notes, diagrams, graphics, examples and explanatory material, and the organisation and format of the enactment."
Nevertheless, judges do refer to Parliamentary materials: eg R v Law (2002) 19 CRNZ 500 (HC) at para 24, R v Oran (2003) 20 CRNZ 87 (CA) at para 18.