Democratic gubernatorial candidates Jay Gonzalez and Robert Massie hammered incumbent Republican Governor Charlie Baker’s record while also taking jabs at each other in a Thursday debate, their final before party activists this weekend choose their nominee.

While largely in agreement on their approaches to education, transportation, gender equity and race, Massie, a longtime activist and former Democratic nominee for lieutenant governor, positioned himself as bringing an outsider perspective to the corner office.

“Beacon Hill is fundamentally broken. It has not been willing to address these core problems. And I think also Charlie Baker is a fraud,” Massie said, responding to sound bites of other Democrats offering praise to Baker and the governor’s popularity.

“He’s not a leader,” Gonzalez, a former Patrick administration official, said of Baker. “He basically approaches the job as where are we, what do we have and what’s the best we can do instead of where we need to be and how do we get there.”

Commenting on how he would improve race inequities in the state, Massie knocked his opponent for not having enough experience.

“I respect Jay. This is not an issue on which he has concentrated his professional life. I have,” Massie said, adding that, as governor, he would host town hall-style discussions about race.

Calling racial disparities highlighted in a recent Boston Globe Spotlight series “disturbing,” Gonzalez said he would “have a very ambitious agenda in this area.” Gonzalez noted that part of that plan would include greater investments in early and public education.

Asked how the state would be able to afford the investments in transportation, education and a single payer health care system, neither Massie nor Gonzalez offered specifics.

Gonzalez said if he doesn’t receive the nomination Saturday at the state Democratic Party convention in Worcester, he would back Massie “100 percent,” but argued his resume makes him the better choice.

“We agree on lots of issues and what we want to accomplish, my experience, leadership experience in state government, I think, better positions me to deliver on the ambitious agenda we need,” he said.

The state primary is September 4.