“There is nothing particularly patriotic or American about talking down America,” Obama said at a meeting of the Business Roundtable in Washington.

Obama said the U.S. could do more to boost its economy, but argued that the nation remains the envy of the world.

"America is great right now,” he said, without mentioning Trump by name. “America is winning right now.”

The president’s not-so-veiled swipe at Trump came ahead of the second Republican presidential debate at the Ronald Reagan Presidential Library in Southern California on Wednesday evening.

Trump has rocketed to the top of the polls among Republican voters by arguing the U.S. has been outfoxed by nations like China and Mexico when it comes to trade and immigration.

Obama slammed the negative rhetoric emanating from Trump and the Republican field.

“In the echo chamber that is presidential politics, everything is dark and everything is terrible,” Obama said. “They don’t seem to offer many solutions for the disasters that they perceive.”

Obama said the biggest problem the U.S. faces is gridlock in Congress, which is blocking many of his initiatives he argues will boost the economy.

“This whole notion we’re losing, nobody outside the U.S. understands what we are talking about,” Obama said.

It was the second time this week Obama took aim at Trump, without mentioning him by name.

During a stop in Des Moines, Iowa, on Monday, Obama targeted Trump and other GOP candidates for using “anti-immigrant” rhetoric in calling for crackdowns on illegal immigration.

White House press secretary Josh Earnest on Wednesday claimed Obama was not singling out Trump in his remarks, saying they "apply to a significant number of candidates in the Republican field."

The president was seeking to provide a "clear, accurate assessment of the advantages the country enjoys” while warning GOP candidates to not “fritter away” the economic progress made since the Great Recession, Earnest added.

Even though Trump's motto appeared to grab Obama's attention, Earnest insisted the president would not tune into the debate.

“I’m confident that the president won’t watch the debate tonight," he said.

--This report was updated at 2:07 p.m.