BLACKSBURG, Va. — Trailing in polls and outspent on the airwaves, Kenneth T. Cuccinelli II, who has sought to capture the swing state of Virginia by building on his Tea Party base, faced his last, best chance to reboot the race for governor in a debate here Thursday.

Mr. Cuccinelli, Virginia’s attorney general, criticized the “platitudes, not plans” of his Democratic opponent, Terry McAuliffe, who has consolidated a lead since the 16-day federal government shutdown, which hit hard in Virginia with its many government employees and contractors.

Mr. Cuccinelli has sought to blister Democrats for the troubled rollout of the Affordable Care Act this month, emphasizing its impact on Virginians. The “Obamacare disaster is unfolding,” he said early in the debate, adding that Mr. McAuliffe favors expanding Medicaid under the health care law. “Why would we expand failure?”

The debate took place on the campus of Virginia Tech, the site of a 2007 shooting by a mentally disturbed student who killed 32 people. It was no surprise that gun violence was an emotional centerpiece as the two candidates faced off in the student union. Outside on the steps, about three dozen young protesters held signs reading “Hokies for Responsible Gun Laws.” A smaller group of adults faced them with “Guns Save Lives” signs.