-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Debug can't find launchable target with MacOS apps #549
Comments
@tmeschter The ILaunchConfigurationService is returning 0 projects with the |
@andrew-tavera @WardenGnaw What kind of project does |
It generates an app using the net7.0-macos runtime (Mac desktop app). Manually adding a launch.json works if you treat it like a console app but change the "program" to go to the binary inside the .app bundle instead of the dll in the bin folder.
|
@andrew-tavera Is this a MAUI project? Would you be able to provide an example project? |
mactest.zip |
Thanks for that; I can see what's going on now. The short answer is that C# Dev Kit is currently focusing support on a narrow set of project types: web applications, MAUI apps (in conjunction with the MAUI extension), and Unity apps (in conjunction with the Unity extension). This particular project falls outside the scope of what we support so we haven't gotten around to figuring out how it should work. The long answer is that the MacOS SDK targets (Microsoft.macOS.Sdk.targets) pull in the Xamarin shared targets (Xamarin.Shared.Sdk.targets) which removes the "LaunchProfiles" capability. Currently all the launch targets in C# Dev Kit are based off the projects' launch profiles; with that capability turned off we have no way of knowing how to launch the project. For the time being I see two options:
|
Thanks for the explanation @tmeschter! Is there any documentation or public roadmap that shows what is supported now and planned? I'm trying to transition off VS4Mac since it is retiring. |
@andrew-tavera Here's the documentation on what is currently supported: https://code.visualstudio.com/docs/csharp/cs-dev-kit-faq#_what-project-types-are-currently-supported. |
related issue: #726 |
I'm assigning this to MAUI since the MAUI extension brings the support for .NET iOS and MacCatalyst, and should handle supporting macOS. |
Describe the Issue
Attempting to debug an app targetting net7.0-macos fails with the error:
"{projectname}.csproj" does not support debugging. No launchable target found.
Steps To Reproduce
Expected Behavior
The app launches with the VS Code debugger attached.
Environment Information
-OS: MacOS 13.4.1
-VS Code: 1.82.2
-Extension Version: v2.2.10
The text was updated successfully, but these errors were encountered: