The race to be the state's chief investment office is growing heated as we move closer to Election Day.

State Comptroller Tom DiNapoli and his Republican challenger, Jonathan Trichter, sparred over President Donald Trump, the performance of the state's pension funds and sexual harassment settlements in their debate on Spectrum News. 

Napoli has been in office for more than a decade. He's a former state assemblyman who was first elected to the position not by the voters of New York, but by the state legislature, which had to fill the post after the former comptroller resigned in a corruption scandal.

"The problem is you're an Albany insider. Your best friends are Albany insiders. And you've used the office to protect the status quo," Trichter said.

In the debate, Trichter was on the attack. The longtime Democrat-turned-Republican criticized DiNapoli's stewardship of the state's $209 billion pension fund. It has not performed as well as other large pension funds around the country.

"My opponent's white papers are white lies," DiNapoli said. "Our fund is 98 percent funded. One of the best funded pension funds in the country."

"Underperformed other large pension funds. You are doing worse," Trichter said. "You aren't outperforming anybody. 

The rivals shared some common ground on climate change. Neither candidate supports the move by New York City leaders to divest the city's pension funds from fossil fuel companies. 

"When you have billions of dollars invested in the energy sector, it's not so easy to say we are just going to pull out of it totally," DiNapoli said.

"I would run a politically neutral pension fund," Trichter said.

But the sparks, and confusion, really surfaced when the candidates had the opportunity to ask each other a question. Trichter tried to get in two.

That's not my question. Can I please ask my question? Let him answer the non-question. You can't have two questions. Yes I can. But you can answer that question if you like and then I'll get my question?

DiNapoli asked Trichter if he would be voting for President Trump in 2020. He would not say.

Trichter also would not say whether the alleged Pittsburg synagogue shooter should face the death penalty, calling it a cultural issue.

"This has nothing to do with the comptroller's office," he said. "I am staying away from cultural issues."

Trichter pressed DiNapoli on his role in a secret taxpayer settlement to women who had accused the former Democratic political boss from Brooklyn of sexual harassment. DiNapoli says he was not involved in the negotiations. But according to news reports, his office helped draft the agreement.

DiNapoli has a wide lead over Trichter in the polls, with many New Yorkers saying they know nothing about the state comptroller's challenger.