Breed, a San Francisco native who grew up in public housing, pushed back when asked about criticism that she is too close to tech executives and former Mayor Willie Brown -- and whether they have too much power.

"Every time I get this kind of question I think about everything I experienced in my life. I find it really offensive when every single time someone like me ends up succeeding in a position it’s attributed to someone else," Breed said.

Asked whether the tech community is too powerful, Breed struck a moderate tone, saying there needs to be a better relationship between the industry and San Franciscans.

Greenberg, in a clearly hostile room, attempted to paint his right-of-San Francisco viewpoints as at least more moderate than the national GOP.

But he stumbled -- and garnered boos -- several times, including when he said he would greet President Trump at the airport if he was mayor, and when he insisted that the San Francisco Republican party is a "cross section of San Francisco" and includes gay, African-American and Asian members along with "several Jews."

Greenberg also drew fire from the other candidates, including when he suggested that the city's homeless problem is the result of liberal policies that are drawing people here from other cities.

Weiss pushed back, noting that 70 percent of the people on the streets of San Francisco became homeless in the city and endorsing a measure on the June ballot that would guarantee legal representation to people facing eviction. She also expressed support for a change to state law limiting rent control.

"This is a manageable crisis. I want everybody in the room to believe that," Weiss said.

Kim spent much of her time recounting her legislative wins around affordable housing and stressing the need for regional and statewide solutions to the city's homeless crisis.

"When counties like Marin refuse to have a 365-day shelter system, that's a problem," she said.

Kim also got into a memorable back-and-forth with Greenberg when he interrupted her to note that the free City College of San Francisco program Kim helped create isn't free for home sellers paying a higher transfer tax, which funds the initiative.

"I know Richie, it was a tax on the ultra-luxury property owners in the city," Kim said to applause.

The issues of homelessness and affordable housing dominated the conversation throughout.

Breed said the city needs to get more creative providing support services for people before they lose their homes and aggressively helping people on the streets with substance abuse and mental health issues. She's endorsed a plan to change state law so that counties have more leverage to force people into conservatorship programs.

"We have to treat this like a crisis," she said.

An edited version of the debate will run Wednesday at 8 p.m. on KQED Public Radio 88.5 FM.