Unless you are paid to collect the trolleys, shuffling around in a supermarket car park at 4pm on a weekday afternoon is not the most rewarding occupation. But this is what politicians do at election time. They hover around, just out of range of the automatic door sensor, smiling at strangers and buttonholing anyone who glances back. By the time the candidates have finished their work, shoppers can't remember whether they came out to buy J-cloths or marmalade.

When they're finished stopping people in supermarket carparks, politicians get their night-time kicks from interrupting Coronation Street with an ding-dong of the bell or a chap of the letter box. Other times they phone out of the blue, already knowing your name, your partner's name and the name of the previous occupant of the house. (They use the electoral register for this, not any sophisticated spyware).

These are determined people and they want something from you: votes. In a place like Dundee, where the result in the two city seats could go either way, with knock-on consequences for the regional list and the whole political make-up of the next parliament, these supermarket shuffles could be crucial.

This being Dundee, we're at a converted jute mill, which is now a Tesco. In the history of supermarket takeovers, this is where it all began in Scotland: Tesco bought Wm Low, the Dundonian grocer, in the 1990s and went from having a toehold north of the border to Tescopoly in one easy move.

I'm here with Jill Shimi, Labour's candidate for Dundee West and one of the most engaging politicians on the election trail. When Jack McConnell came to the city at the beginning of the campaign he said he was amazed by the number of people who appeared to know Shimi.

This is solid Labour territory, but it's patronising to say political choice is a generational inheritance. Here people will vote Labour because doing so has made a material difference to their lives.

"We've talked about it when the news has been on the telly and I've asked my two daughters and sons-in-law if they'll be voting SNP," says Jim Anderson, who has voted Labour all his life like his father before him. "They turn around and say Do you think we're daft?'. The benefits they receive - and they're working - it's unbelievable. They'd be crazy not to vote Labour."

In a place like Dundee, where in some wards 40% of the population earns less than £15,000 a year, benefits such as the working families tax credit are a huge boon. But loyalty has its limits.

Jim is an interesting case. He'll vote Labour in the council elections and for the Scottish parliament, but don't ask him to support Labour at Westminster again. "You know, I'd rather vote for the BNP than vote for Labour again in Westminster. They've become more like the Tories the longer they've gone on," he says candidly.

People like Jim are the reason that Dundee is on a political knife-edge. The two Holyrood seats in the city are held by Labour and the SNP, but both are marginal, with the two parties essentially sharing the vote in the city on the banks of the Tay.

Dundee West is nominally Labour. Its two-term MSP, Kate Maclean, is standing down, having never really made the transition from effective council leader to contented backbench MSP. But she took a tiny majority of 121 votes in 1999 to a 1066 margin at the last election. That's the base that Jill Shimi, the current high-profile council leader, starts from with another councillor, the SNP's Joe Fitzpatrick, a party worker who has stood for Westminster, snapping at her heels.

Dundee East was taken by the SNP's Shona Robison in 2003 with a majority of just 90 votes. She now faces a challenge from Iain Luke, the former Labour MP who lost the Westminster version of the seat in 2005 to Robison's husband, Stewart Hosie.

The anti-war MSP John McAllion was Labour's casualty in 2003 when Robison took the seat, mainly because the SSP opted not to stand against him and left the SNP to soak up the hard left, anti-Labour vote. I remember doing a door-to-door stint in the constituency with McAllion in the bright spring of 2003 as the Americans entered Baghdad. The media convention was that his principled opposition to the Iraq war would stand him in good stead. In middle-class villas it did, but in working-class council blocks, where people had relatives in the Scottish regiments and a tradition of joining the armed forces, his principles did not go down so well. It was a sharp lesson in how being an anti-war politician cuts both ways.

However the votes fall, May 3 will see a revolution in Scottish politics: the new voting system for the 32 local authority elections means that 15 Labour-run councils across Scotland will either change hands completely, or see no party have overall control.

In the last four-year term, Dundee City Council has become in miniature what the next Scottish parliament might become writ large. The SNP is the largest group on the 29-member council with 11 seats. But Labour, with 10 councillors, teamed up with two Liberal Democrats to form the political administration, with the support of five Conservative councillors who have been given the chairmanship of non-political committees such as licensing. The SNP regard the deal as an unholy unionist alliance, but Shimi, who leads the council, says policy is more robust and that everyone has to find common ground for the good of the city.

In another part of town, Shona Robison opts for sensible shoes as the weather turns from bright sunshine to a cold blast as the evening draws in. Robison, with her seemingly hurricane-resistant curls, soldiers on until every sheet on the canvassing clipboard is dealt with.

Hers is a regimented operation, supported by a small group of council candidates and party activists, and one that is being repeated across three other areas that same evening.

We stand in Findhorn Street, right on the edge of the Dundee East constituency and an SNP stronghold. The majority of people who answer the door have already pledged support or appear to be easy converts from Labour.

The Labour canvassers started early too, on the telephone and door-to-door, but the machine-like approach to the doorsteps that Willie Sawyers developed for Robison and her husband Hosie in Dundee East, using survey cards and freepost returns long before any election, has paid dividends for the SNP campaign in identifying switch voters and their concerns.

As well as asking for voting intentions, the SNP canvassers ask how people would vote in an independence referendum. This is as much as question of psychology as anything else: having obtained a doorstep pledge of support, Robison judges - and she's correct more often than not - that asking the independence question would be chancing her luck.

One man comes to the door with white powder on his hands. He's not wearing a pinny, so we conclude it is plaster dust and not baking flour. Yes, he'll support the SNP at the election, but he wouldn't vote for independence in a referendum.

Independence is just not a doorstep issue. The next day, an opinion poll appears in The Times which shows that 45% of SNP supporters would support full independence, compared with 47% who simply want increased powers for the Scottish parliament. It's into that narrow gap that a deal between the LibDems and the SNP on the nature of a referendum might be made.

The poll also shows the SNP lead narrowing. The Labour spin machine has it that their campaign against nationalism, which the SNP says bounces off their armour, is in fact having an effect in the heartlands and that the gap will close as election day comes closer.

The big problem for Labour - and this is not just in Dundee - is what their pollsters call the LDLs; canvassing code for former Labour voters who are now in the category of doubtful Labour voters. The telephone and household canvassing returns show that there are still a frighteningly large number of LDLs out there. That means a lot more doors to knock on in the last 11 days.

Last week: Canvassing the borderlands