It is now near impossible to procure a genuine STLINKV2 or a good clone. Newer versions of STM32CubeProgrammer will not work with poor clones.
In pursuit of a small inexpensive replacement for the STLINKV2, the STLINKV3-MINIE is a candidate. That said, they can be difficult to source… mine is on 9 months wait from element14.
Above is the STLINKV3-MINIE (~$20).
It is not so readily adapted for jumper wires as the older products, but does have a STDC14 header which has the needed signals.
STDC14 is the new STMicroelectronics standard JTAG/SWD debug cable. Pins 3-12 are exactly the same as the standard ARM Cortex 10pin connector. This enables this cable to be connected to the 10pin header by overhanding the outer pins beyond the connector.
Above is an extract from the STLINKV3 manual.
Above is a little inexpensive board to make a break-out board for the STDC14 interface. I bought 9 of these for just under $10 posted from Oshpark.
Also needed are some 2×7 0.05″ headers ($6/10) and cables ($2/2). Some 0.1″ headers completes the adapter.
Ordinary unshrouded headers and pre-made cables are available at low cost on Aliexpress. Shrouded headers are more expensive. Samtec FTSH Keyed connectors are quite expensive.
Above is the made up break-out demonstrating that hand soldering is quite sufficient, but you need a small tip.
Individual jumper wires can be connected from the header pins along the edge, eg 3 or 4 are required for SWD programming.
Above is the STLINKV3-MINIE with adapter board and jumpers for SWD connection.