Debug with STLink, have two connected, how do you tell debugger which one to use?

It’s not straightforward but can be done. See these posts: