SACRAMENTO, Calif. (AP) — A straightforward effort to extend a Hollywood tax break evolved into a robust debate Tuesday in the state Senate over California's tax code and how it alternately punishes and favors certain industries.

Several lawmakers from both parties used the debate over SB1167 to say the Legislature should consider similar breaks for other industries, including high tech and biotech, while seeking to revamp the state's tax code. Many said film and TV production is just one example of a major industry fleeing the state because of high costs and stifling regulations.

Republican Sen. Sam Blakeslee, of San Luis Obispo, argued for an overhaul of the state's outdated tax system, saying it has become a burden on the state's ability to boost its economy.

Lawmakers are "handing out tax credits to favored industries that are politically connected," he said.

He noted that a detailed report issued by a tax-reform commission convened under former Gov. Arnold Schwarzenegger has been ignored.

Even some Democrats took the occasion to argue for a wider examination of personal and corporate taxes in the state. Sen. Loni Hancock, D-Berkeley, said she would oppose the extension of the Hollywood tax credit, favoring instead "a real discussion" that would lead to sufficient tax revenue for public schools and higher education.

Sen. Roderick Wright, D-Inglewood, listed some of the major manufacturing sectors, including autos, airplanes and passenger tires, that have abandoned California in recent decades as other states offered lower taxes and fewer regulations. He and others noted how even Silicon Valley high tech companies often choose to expand out of state or, as in the case of Apple, outsource most of their manufacturing to Asia.

Wright singled the state's fee-heavy greenhouse gas emissions law as a potential impediment to California's economic attractiveness.

"If we're going to become an enemy to business, we should at least be honest about it," he said.

The bill by Sen. Ron Calderon, D-Monterey Park, eventually passed on 32-3 vote and was sent to the Assembly.

It extends a $100 million-a-year tax credit for film and television production for two years, until 2017. It requires the independent Legislative Analyst's Office to issue a report by January 2015 on the tax credit's economic effects.

A committee analysis said the credit will cost the state $22 million in the 2015-16 fiscal year alone.

But Calderon said the cost to the general fund is offset by the money generated by film production remaining in state. He said the credit has generated $2.9 billion in direct spending over the last 2.5 years, creating tens of thousands of jobs.

More than 40 other states, including New York, a main competitor to California's film industry, offer production credits. Many of those are more enticing than California's.

"I love New York, but I don't love it enough to send all our jobs and all of our business to the East Coast," Calderon said in arguing for the extension.

A companion bill that would extend the tax credit through 2020 is pending in the Assembly.

Even with the tax credit, film and TV production continues to head to other states and Canada. The Los Angeles Times reported last week that just two of the 23 one-hour television dramas for the upcoming season were shot in Los Angeles County, with most production moving to New York, North Carolina and other states.