Skip to content

cppvsdbg does not support MSIX app execution aliases #14216

@brycehutchings

Description

@brycehutchings

Environment

  • OS and version: Windows 11 25H2
  • VS Code: 1.109.5
  • C/C++ extension: 1.30.5
  • OS and version of remote machine (if applicable): n/a
  • GDB / LLDB version: n/a

Bug Summary and Steps to Reproduce

Steps to Reproduce:

  1. Set up a launch.json to launch something with an MSIX execution alias using cppvsdbg debugger. A common one that many people have is installed is WinGet:
{
  "version": "2.0.0",
  "configurations": [
    {
      "name": "WinGet",
      "type": "cppvsdbg",
      "request": "launch",
      "program": "winget.exe",
      "args": [],
      "console": "externalTerminal"
    }
  ]
}
  1. Press F5. Notice you get an error "Unable to start program 'C:\Users\username\AppData\Local\Microsoft\WindowsApps\winget.exe'. Not implemented.". But if you press CTRL+F5 it executes it fine in the correct package context.

Debugger Configurations

Launch.json:

{
  "version": "2.0.0",
  "configurations": [
    {
      "name": "WinGet",
      "type": "cppvsdbg",
      "request": "launch",
      "program": "winget.exe",
      "args": [],
      "console": "externalTerminal"
    }
  ]
}

Debugger Logs

Unable to start debugging. Unable to start program 'C:\Users\...\AppData\Local\Microsoft\WindowsApps\MrBackgroundHost.exe'. Not implemented.

Other Extensions

No response

Additional Information

For some background:

  • MSIX app execution aliases are defined here: https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-uap5-appexecutionalias. They allow a packaged executable to be executed from command-line.
  • App execution aliases are the only way we've found we can launch our product in its appropriate MSIX package context from VS/VSCode, which is how customers will run our executable too.
  • Visual Studio does not have this problem and can launch/debug things through an app execution alias just fine (I do this with an NMake-style vcxproj).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions