there's a custom debug config option which is not documented yet, but it's in the pipeline.
for now add a file named "debug_custom.json" to your sketch folder and use this content
{
"servertype": "jlink",
"interface": "swd",
"serverpath": "/usr/local/bin/JLinkGDBServer"
}
these parameters will override the ones automatically generated.
Of course your path to JLinkGDBServer might be different