Ted Cruz channeled former House speaker Newt Gingrich during the Republican presidential debate Wednesday with a pointed attack on the media -- specifically, the event's host network and moderator. And it got a huge applause from the conservative crowd in Boulder, Colo.

When asked about his opposition to the two-year budget agreement reached between Congress and the White House this week and whether it proves "he is not the kind of problem-solver American voters want," Cruz responded with fire directed at CNBC moderator Carl Quinatilla.

"Let me say something at the outset, the questions that have been asked so far in this debate illustrate why the American people don't trust the media," he said, posing as a sort of white knight candidate coming to the defense of his fellow GOP contenders. "This is not a cage match, and you look at the questions: 'Donald Trump, are you a comic book villain? Ben Carson, can you do math? John Kasich, will you insult two people over here? Marco Rubio, why don't you resign? Jeb Bush, why have your numbers fallen?' How about talking about the substantive issues people care about?"

And when Quintanilla tried to interject, he continued, "Carl, I'm not finished yet. The contrast with the Democratic debate, where every fawning question from the media was, 'Which of you is more handsome and wise?'"

The crowd went wild.

He never answered the budget agreement question he was originally asked.

"I just want the record to reflect I asked you about the debt limit and I got no answer," Quintanilla said.

After some back-and-forth, the debate moved on to an inquiry directed at Rand Paul.

Gingrich famously went on a similar media and moderator-focused offensive at a Republican primary debate in South Carolina in 2012 when asked by moderator John King if he would address stories about his alleged marital infidelity.

"No, but I will," he replied begrudgingly. "I think the destructive, vicious, negative nature of much of the news media makes it harder to govern this country, harder to attract decent people to run for public office, and I am appalled that you would begin a presidential debate on a topic like this."

His response was met with applause from the audience and, from many, he received a standing ovation.

"I am frankly astounded that CNN would take trash like that and use it to open a presidential debate," he said.

Marco Rubio also made an attack on the media just minutes before Cruz in the debate when Quinatilla asked about a Sun Sentinel piece published Tuesday calling for his resignation. The article came in response to a Washington Post report that the Floridian "hates" serving in the U.S. Senate and highlighting his high quantity of missed votes. "You are ripping us off, senator," the Sun alleges.

"I read that editorial today with a great amusement. It's actually evidence of the bias that exists in the American media today," Rubio said, pointing to a string of prior Democratic presidential candidates, including John Kerry and President Barack Obama, who also missed votes during their campaigns. "This is another example of the double standard that exists in this country between the mainstream media and the conservative media."

Rubio has said he will not run for Senate reelection.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.