Mine suddenly acted up a few years ago, just like yours: barely idled, ran fine past 2500 rpm. On my car it turned out to be the N90 vvt intake solenoid died. If you have a scanner like Ross-Tech, you can check the values of these measuring blocks:
Valid for both MK4 and MK5 R32:
• Blocks 208 & 209 should be as close as possible to 0°, the spread should not exceed 3°. The absolute wear limit is 8° spread whether + or minus. If the spread is well above 3° but under the limit, then chain & guide replacement should be considered.
Golf 5 R32 & Audi BUB only (intake adjustment range 52°/exhaust adjustment range 42°):
• For both blocks 90 & 91 the set-point value at idle is 0°, no matter what the values in blocks 208 & 209, at a duty ratio of about 15.3%.
The actual value should not be more than 0.5 ° (Valid for both OEM & aftermarket cams).
If the values are way off from 0° the timing chain may be mistimed or skipped. Around 11.25° deviation corresponds to a skip of 1 tooth.
-----------------------------------------------------
The above can give an indication on the vvts operation. If you can devise a way to apply 12v directly to the valve(s), you can hear them click every time the voltage is applied: on, off for a moment. No click equals a dead vvt solenoid. Simplest way to do this is to get the connectors with their pigtails, either at a salvage yard or elsewhere. I could only find the intake connector. You can just cut the wires if you are comfortable with reattaching them. Like so:
The N90 valves are quite expensive at the dealers, so I wanted to make sure before buying them. You can get them on eBay for significantly less.