vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

WindowsDebugLauncher.exe is delay-signed or test-signed assembly

Open yehsi2000 opened this issue 10 months ago • 7 comments

Environment

  • OS and version: Windows 11 24H2
  • VS Code: 1.108.2(user setup)
  • C/C++ extension: ms-vscode.cpptools-1.30.3-win32-x64
  • OS and version of remote machine (if applicable):
  • GDB / LLDB version: msys2 ucrt 17.1

After updating the C/C++ extension to version 1.30.3, I am unable to start debugging. The debug adapter crashes immediately with a strong name validation failed exception from hresult: 0x8013141a error. Even launching WindowsDebugLauncher.exe directely from powershell in it's location prints same error.

When I looked into windowsdebuglauncher.exe from file explorer property, digital signature is also invalid.

I checked the assembly using sn -v WindowsDebugLauncher.exe and it says "WindowsDebugLauncher.exe is a delay-signed or test-signed assembly".

I was able to bypass the error by manually skipping verification for this assembly using sn -Vr WindowsDebugLauncher.exe

I installed multiple times from vscode extension window, tried removing extension file inside .vscode folder and also tried installing with vsix from github but results were same.

Maybe WindowsDebugLauncher is not fully signed during the build process?

Bug Summary and Steps to Reproduce

Bug Summary:

Steps to reproduce:

  1. In this environment update ms-vscode.cpptools to version 1.30.3.
  2. Attempt to start a debug session with this given task.json and launch.json config. but whole things are from https://code.visualstudio.com/docs/cpp/config-mingw so might not matter.
  3. The Unhandled exception System.Security.SecurityException: strong name validation failed HRESULT: 0x8013141A appears on terminal

Debugger Configurations

launch.json

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "C/C++: g++.exe build and debug active file",
      "type": "cppdbg",
      "request": "launch",
      "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
      "args": [],
      "stopAtEntry": false,
      "cwd": "${fileDirname}",
      "environment": [],
      "externalConsole": false,
      "MIMode": "gdb",
      "miDebuggerPath": "C:\\msys64\\ucrt64\\bin\\gdb.exe",
      "setupCommands": [
        {
          "description": "Enable pretty-printing for gdb",
          "text": "-enable-pretty-printing",
          "ignoreFailures": true
        },
        {
          "description": "Fix pretty-printing for gdb",
          "text": "set charset UTF-8"
        }
      ],
      "preLaunchTask": "C/C++: g++.exe build active file",
    }
  ],
  "setupCommands": [
    {
      "description": "Fix pretty-printing for gdb",
      "text": "set charset UTF-8"
    }
  ]
}



task.json

{
      "type": "cppbuild",
      "label": "C/C++: g++.exe build active file",
      "command": "C:/msys64/ucrt64/bin/g++.exe",
      "args": [
        "-fdiagnostics-color=always",
        "-g",
        "${file}",
        "-o",
        "${fileDirname}\\${fileBasenameNoExtension}.exe",
        "-std=c++20"
      ],
      "options": {
        "cwd": "C:/msys64/ucrt64/bin"
      },
      "problemMatcher": [
        "$gcc"
      ],
      "group": "build",
      "detail": "Task generated by Debugger."
    },

Debugger Logs

System.IO.FileLoadException: Could not load file or assembly 'WindowsDebugLauncher, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)
File name: 'WindowsDebugLauncher, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A)

Other Extensions

No response

Additional Information

No response

yehsi2000 avatar Feb 03 '26 08:02 yehsi2000

Hi, I am experiencing the exact same issue. Rolling back to a previous version temporarily resolved the problem, but the latest release seems to be broken due to strong name validation.

Error Details: System.IO.FileLoadException: Could not load file or assembly 'WindowsDebugLauncher, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)

My Environment:

OS: Windows 11 25H2

VS Code Version: 1.108.2(user setup)

C/C++ Extension Version (Broken): 1.30.3

C/C++ Extension Version (Working): 1.29.3 This seems to be a regression in the recent package signing or build process. Looking forward to a fix!

Nanami-99 avatar Feb 03 '26 09:02 Nanami-99

I am having the same issue right now, rolling the C/C++ extension back to 1.29.3 works.

Rolling back to C/C++ extension 1.29.3 works. I suspected my antivirus. I blamed Gemini and Claude. The one thing I didn't suspect was Microsoft. The world is indeed a makeshift stage, and today, the "WindowsDebugLauncher" forgot its script.

rm-rf-past avatar Feb 03 '26 10:02 rm-rf-past

I also have this exact same error. Amp suggests repairing my .NET 3.5 and 4.0. Is there anything wrong with .NET Framework?

Edit 1: Life or death situation. I have installed 1.20.0 and it still shows this error. Also Visual Studio Code seems to show a problem "cannot verify signatures".

Edit 2: Actually devs didn't care to re-sign this package when building it so it happens to be this error.

jdraggy avatar Feb 03 '26 11:02 jdraggy

I ran into exactly the same problem. I blamed it on Visual Studio for .NET C# development, which I downloaded yesterday. I asked ChatGPT, and he also confirmed my doubts about C#. This post eased the burden on my shoulders a bit, but I'm still not sure if I might have ruined my life due to my limited programming knowledge and overly strong trust in Microsoft. Please update me on this issue and when a solution is found! I really need to get my work done ASAP!

grustchu avatar Feb 03 '26 18:02 grustchu

We are working on a fix for this right now. If you need an immediate solution, please downgrade the extension to 1.29.3 and we will update this issue when the new release is out.

We're very sorry for the inconvenience. The MIEngine project which we use for our debugging support recently made changes to their build pipeline and we mistakenly tested it on a machine that had the test certificate already. This version of the debugger was also packaged in our pre-release version and didn't get any reports of a problem, so this slipped through.

bobbrow avatar Feb 03 '26 18:02 bobbrow

Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.30.4. It was incorrectly "test signed" (works for Microsoft internal developers) instead of "real signed". We had released 1.30.2 (pre-release) with the bug on January 26, but no users reported any issue until it got shipped out of pre-release yesterday.

sean-mcmanus avatar Feb 03 '26 22:02 sean-mcmanus