You need to connect ST-Link to debug port on CORE2 board, it is four pin connector between hSens ports. Some wire jumpers may be useful for connecting.
Install ST-Link driver, Windows should detect and install drivers automatically, on Linux you will need to follow this guide.
Open VSC and build project of your choice.
Press F9 to set breakpoint in place that you want to debug.
Press F5 to start debug session, keep pressing F5 to continue code execution after it stops at breakpoints.