Republican Denver Riggleman and Democrat Leslie Cockburn are competing to fill an open seat in Virginia’s 5th Congressional District. (Dayna Smith/For the Washington Post)

Democrat Leslie Cockburn vowed to resist President Trump while Republican Denver Riggleman promised “common sense” and bipartisanship as the rivals for the 5th Congressional District seat met for their second debate Thursday.

Cockburn, a former “60 Minutes” producer, and Riggleman, a former Air Force intelligence officer and craft distillery owner, are political newcomers vying for the seat being vacated by freshman Rep. Thomas Garrett (R). Garrett announced in May that he is an alcoholic and would abandon his run for a second term so he could focus on recovery and his family.

From her opening statement to her closing an hour later, Cockburn invoked Trump as the driving force behind her bid.

“I am one of those women who stood up because Donald Trump came into office,” she said at the outset. She wrapped up by declaring that “2018 is a blue wave, and it is a wave for women.” Unless Democrats retake power, she said, “we are going to lose our democracy because we have people in power who have no respect for institutions.”

Riggleman took a markedly different tack, contending throughout the hour-long debate that he would bring a willingness to work across the aisle in Washington. Riggleman, who ran unsuccessfully for governor last year, traces his entry into politics to his battles with government bureaucracy and entrenched liquor interests as he opened Silverback Distillery in 2014. He said his goal was to make the system work for ordinary people.

“Actually, Leslie and I agree on a few things,” he said when the discussion turned to health care, noting that they both believe it is a primary issue. “I don’t think we need an Obamacare. I don’t think we need a Trumpcare. I think we need a ‘Bipartisancare.’ ”

As for Trump, Riggleman said he would support the president’s policies when they benefit the district, and oppose them when they don’t. He called Trump’s tariffs a mixed bag — benefiting some farmers but hurting others.

The candidates appeared before a packed auditorium at Madison County High School, with supporters on each side sporting offbeat T-shirts that sought to make light of campaign controversies.

Some Cockburn supporters wore shirts emblazoned with “Semites for Leslie,” an attempt to push back on allegations, based on a book she co-authored that was highly critical of Israel, that she is anti-Semitic. Some of her backers also wore shirts that played off the slogan used by Hillary Clinton, the former secretary of state who lost to Trump in 2016: “I’m with Leslie.”

Some Riggleman fans wore shirts with an image of Bigfoot plastered on a Virginia map. “Riggleman ’18,” they read. “You have to believe!” It was a reference to a satirical book that Riggleman wrote — before running for office — about the mating habits of Sasquatch.

Riggleman and Cockburn are competing to represent a largely rural district that stretches from wealthy Washington exurbs to struggling communities on the North Carolina line. Trump won the 5th by 11 points in 2016, even as Clinton took the state by more than five points. Amid a blue wave the next year, Republican gubernatorial candidate Ed Gillespie won the district by nine points, even though Democrat Ralph Northam won Virginia overall by the same nine-point margin.

Independent analysts rate the race as “leans Republican.”

The debate was moderated by Stephen Farnsworth, a University of Mary Washington political scientist and director of the Center for Leadership and Media Studies. Farnsworth would throw out a broad topic and then give each candidate the chance to speak for a few minutes.

“What would you do to address education?” he asked at one point.

Cockburn responded that if Democrats could flip control of the House, Rep. Robert C. “Bobby” Scott (D-Va.) would become chairman of the Committee on Education and the Workforce, and that would improve “the education system.” She called for universal pre-kindergarten, saying it would help narrow the achievement gap between low-income children and their more affluent peers. She also called for tuition-free community college. She did not put a price tag on the pre-K or college plan.

Riggleman said children who attend underperforming schools should have the right to transfer to a better one, although he didn’t explain how that would work. He also said he opposes linking education funding to standardized test scores — a practice Congress ended three years ago.

He said that he wants to offer tax credits to families that home-school their children and that the credit would equal the average per-student cost of education in the local school district. Asked after the debate if that would drain tax revenue used for public education, he said: “It would make the public schools have to be a little bit more competitive, wouldn’t it? And really, not a whole lot of people home-school. I think we’re talking about a very small slice of the population.”

Cockburn declined to take questions after the debate. “I’m not going to do an interview right now,” she said.