WASHINGTON — Lawmakers today will begin tackling the thorny issue of immigration debate with an unusual, open debate in the Senate aimed at addressing the fate of young “Dreamer” immigrants as well as boosting border security.

But a major variable hangs over the efforts of lawmakers as they begin what could be a weekslong and politically bruising process: What kind of legislation will President Trump ultimately support?

Trump’s immigration demands have fluctuated wildly. He first said he would sign whatever agreement lawmakers present to him, only later to reject a bipartisan plan that helped lead to a government shutdown last month.

Trump then outlined four pillars of immigration reform that he said he wants from a legislative package: a path to citizenship for 1.8 million immigrants brought into the country illegally by their parents, boosted border security that includes $25 million in southern border wall funding, ending the visa lottery system and tightening family reunification immigration requirements — which he refers to as “chain migration” to apply only to immediate family members, not including parents.

That last point is likely to be a nonstarter for Democrats, while the path to citizenship for immigrants eligible for the Deferred Action for Childhood Arrivals program that Trump rescinded is opposed by conservative Republicans.

That means today’s debate opens with a wide partisan divide and an uncertain prospect for success, despite Senate Majority Leader Mitch McConnell’s (R-Ky.) statement last week that the open amendment process “will ensure a level playing field at the outset.”

“While I obviously cannot guarantee any outcome, let alone super-majority support, I can ensure the process is fair on all sides,” McConnell said of the plan to introduce a “shell” bill and then open the debate up to allow lawmakers on both sides to offer ideas in the form of amendments.

Sen. Jeff Flake (R-Ariz.), one of several lawmakers working on a bipartisan agreement, said he believes “we can get something done this week.”

“We’re going to have something in the Senate that we haven’t had in a while,” Flake said yesterday on NBC’s “Meet the Press.” “It’s a real debate on an issue where we really don’t know what the outcome is going to be.”

Experts were less optimistic.

“For those members who want a full and open process, they are about the see how ugly and divisive things can get with each immigration-related amendment,” said Jim Manley, a Democratic strategist who was an aide to former Sens. Harry Reid and the late Edward M. Kennedy.

Consensus in the immigration debate has been elusive, with Trump as a complicating factor. Yesterday in his weekly address, Trump seemed to change his view again, discussing only three pillars of immigration reform — dropping all reference to a path to citizenship and focusing instead on reforming existing immigration laws he called “so weak, so sad, so pathetic.”

“Chain migration is a disaster and very unfair to our country,” Trump said. “The visa lottery is something that should have never been allowed in the first place. People enter a lottery to come into our country. What kind of a system is that?”