But come the third day's close, Ireland remained in trouble at 64 without loss in their second innings -- still 116 runs adrift of Pakistan's 310 for nine declared after a meagre 130 all out first time around.
But with Mick Jagger, a lifelong cricket fan, among the crowd -- the Rolling Stones play a concert at Dublin's Croke Park on Thursday -- the openers at least gave Ireland some satisfaction in a day dominated by Pakistan.
Joyce was 39 not out and Ireland captain Porterfield unbeaten on 23 at the close after they were both dropped off Mohammad Amir.
Joyce, out for four in the first innings, was on nought when he edged Amir low to the left of wicket-keeper Sarfraz Ahmed, with the diving Pakistan captain unable to cling on to the chance.
And Porterfield had made just three when Azhar Ali made a mess of a routine catch at third slip.
Former England one-day international Joyce, at 39 the oldest Test debutant since Australia's Bryce McGain made his bow aged 36 in 2009, cashed in with some elegant shots including a cover-driven boundary off Mohammad Abbas.
The paceman took four wickets for 44 runs as Ireland's first innings was wrapped up inside 48 overs.
Abbas struck twice in a 30-minute spell before lunch to leave Ireland five for three after Sarfraz's well-timed declaration.
Ireland were in danger of marking their debut with the lowest completed innings total by any side in the 141-year history of Test cricket -- New Zealand's 26 against England at Auckland in 1955.
But Kevin O'Brien's belligerent 40 spared them that embarrassment on a day when more than 100 former Ireland internationals had gathered to celebrate the team's elevation to the elite level of the men's game.
Meanwhile Gary Wilson, who injured his arm batting in the nets and so came in down the order, made 33 not out to help ensure South Africa's 84 against England at Port Elizabeth in 1889 remained the lowest total by a side in their maiden Test innings.
The batting of Ireland, the 11th nation to play men's Test cricket, was always likely to prove decisive in the outcome of this one-off match.
Former England one-day international Joyce, arguably Ireland's greatest batsman, appeared to be a victim of the fact the Decision Review System was not being used because Cricket Ireland had decided they could not afford the $50,000 cost.
But while replays suggested the ball that did for Joyce may have pitched outside the line, there was little doubt about the Abbas delivery that had fellow opener Andrew Balbirnie lbw for a duck.
Porterfield then fell for one when Amir uprooted his off-stump with what became the last ball before lunch.
Leg-spinner Shadab Khan continued his fine all-round display by taking two wickets in three balls to leave Ireland 61 for seven.
And when he had last man Tim Murtagh caught at short leg, Ireland were 31 runs shy of the follow-on avoidance target of 161.
They needed to be within 150 runs of Pakistan, rather than the usual 200, after rain had washed out the whole of Friday's first day.
This was the first time Pakistan had enforced the follow-on in a Test in 16 years since they beat New Zealand by an innings and 324 runs at Lahore in 2002.
Pakistan resumed on their overnight 268 for six.
Shadab and Faheem Ashraf extended their seventh-wicket century partnership to 117 before Shadab was lbw to Murtagh, who took four for 45.
Faheem, dropped several times, was in sight of the notable feat of a hundred on Test debut when he was caught behind off medium-pacer Stuart Thompson for 83, the innings' top score.
First Published: May 14, 2018, 7:50 AM IST