Connection fails when debugging using Debug with Ozone in the nRF Connect for VS Code extension

Hello, 

I am trying to debug a basic test project and using the "Debug with Ozone" button in the nRF Connect for VS Code extension. I am using the nrf54l15dk board for development purposes. Here is the autogenerated ozone.jdebug file:

// This file will be overwritten on each session.
// Any manual changes made to this file will be lost.

void TargetDownload (void) {
    Util.Log ("Downloading Program: c:\nordic\test\build_1\merged.hex");
    Target.LoadMemory ("c:\nordic\test\build_1\merged.hex", 0);
}

void OnProjectLoad (void) {
    Project.SetDevice ("nRF54L15_M33");
    Project.SetHostIF ("USB", "001057773037");
    Project.SetTargetIF ("SWD");
    Project.SetTIFSpeed ("4 MHz");
    Project.AddSvdFile ("$(InstallDir)/Config/CPU/Cortex-M4F.svd");
    Project.AddSvdFile ("c:\ncs\v3.3.1\modules\hal\nordic\nrfx\bsp\stable\mdk\nrf54l15_application.svd");
    Project.SetOSPlugin ("ZephyrPlugin.js");
    File.Open ("c:\nordic\test\build_1\test\zephyr\zephyr.elf");
    Window.Show ("Zephyr");
}

Even though this file gets opened correctly in Ozone, when I try to download and reset the program, I get an error message "Connection failed". If I go to Tools/Debug Settings, I am noticing that the Host Interface is configured to a wrong random Serial Number, different from my board's SN. If I change the SN from the GUI there, connection works fine. 

I have also noticed that stripping away the leading zeros from the SN in the autogenerated ozone.jdebug file and then opening that file directly from Ozone solves the problem.  

Is there a more permanent solution to that bug, so that I do not have to manually overwrite the correct SN of my device every time I press Debug with Ozone? Is this a problem with the nRF extension or with my specific project settings? 

Thank you 

Related