Debugging is the most efficient way to find bugs and fix them easily. Debugging interface would be 20 pins connector or just 3 pins. In any way you have to connect cable to mainboard.
I would like to meet you a very easy way to interface with PCBs. You do not have to solder any header and dont need to leave it on the board. On the other hand, you dont need to place footprint of special design expensive JTAG connectors on your PCB. This tool is good enough for home builders and pro makers.
I prefer to use 2.54mm pitch space model but there are also available 1.27mm pitch type. There are single row or double rows models. You may also design your own interface model and replace with the original one. You can buy one of the predefined models and change it if you need.
I work on STM32 and MSP430 microcontrollers in general and they both support 4 wire interface including VCC and GND. This tool is saved my life during debugging and firmware update process.
If you like it and would like to get one, key word for aliexpress is “Test Tool PCB Test Fixture” you can find many sellers and different types of tools. The store number I have bought is 1199788 but you can check the best one for your location.
I hope you enjoy this tool. Please send your notes to me.