The first televised debate in the Democratic Massachusetts state auditor primary got heated at times as the candidates sought to hold each other accountable for their respective voting histories and to differentiate their experience.

Also known as the state’s chief accountability officer, the auditor is tasked with analyzing and investigating how state agencies operate and spend taxpayer dollars.

During the debate on Greater Boston, one main point of contention between state Sen. Diana DiZoglio and Chris Dempsey, the former assistant secretary of transportation under Gov. Deval Patrick, was how the state’s tax-cap or excess revenue law has been handled this year.

Responding to a question about as much as an estimated $3 billion overage in state tax payments that, by law, are supposed to be returned to taxpayers, Dempsey was quick to blame the current Legislature for not directly addressing where that money should go this session, claiming it had “lost its opportunity.”

DiZoglio said she supported the money being returned to taxpayers. In response to Dempsey’s criticism of state lawmakers, she noted that if her opponent was in the Legislature, “he would be fighting for a 25 cent gas tax” on residents, which DiZoglio deemed “unacceptable.”

Watch the debate

Multiple points of contention between the two focused on transparency, which is a major focus for the office of state auditor.

In late July, Dempsey posted his responses to several questionnaires from advocacy groups and organizations that have asked him where he stands on issues and challenged DiZoglio to do the same. While DiZoglio later posted some of her responses, she posted several more in the moments before the debate’s taping.

DiZoglio also pressed Dempsey on his 2020 vote, as a Brookline Town Meeting member, against ending taxpayer-funded nondisclosure agreements.

“For an auditor to say they don’t support transparency around these agreements is absolutely unacceptable,” DiZoglio said.

Dempsey shot back, claiming DiZoglio had her facts wrong. He said he stood by his 2020 vote to offer nondisclosure agreements as an option to survivors, and that he “stands with victims and with victims’ advocates on this issue.”

While DiZoglio and Dempsey both agreed that the MBTA needs a safety audit, DiZoglio accused Dempsey of being “part of the failed culture of transportation that we are seeing now,” referencing Dempsey’s time under Gov. Patrick.

Dempsey countered that he “made the T work better and, as an auditor, [would] gonna make it work better again.” He also pointed to a four-point plan to get the T back on track, which he is releasing tomorrow, and noted that it is the first time he has “genuinely questioned [his] safety” while taking the public transit.

In perhaps the most contentious moment of the debate, both candidates addressed Massachusetts’ significant wealth gap.

While DiZoglio said that she planned to do a “deep dive into different state agencies” and find where she can increase equity in state contracts, while saving taxpayer dollars, she referenced the MassPort Model of integrating inclusion into public-private partnerships.

When Dempsey questioned DiZoglio’s plans to use the model and questioned whether she fully understand how it works, Dizoglio fired back, saying, “I understand very well, though I am used to men like my opponent up on Beacon Hill trying to discredit the work of women.”

When asked what their first audit would be, if elected, Dempsey focused on Massachusetts State Police reform and pointed to his history leading No Boston Olympics as proof that he has “taken on the establishment” before.

Of her plans, DiZoglio said she that would do an audit of the office itself.