-
Notifications
You must be signed in to change notification settings - Fork 676
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
Default launch.json should point at a startup project instead of the program #1876
Comments
Cool! @DustinCampbell @rchande @WardenGnaw @caslan @TheRealPiotrP how does my proposed syntax look to you (see 'Proposed example' above)? |
@WardenGnaw Nice. So it looks like VS Code doesn't modify launch.json if you "resolve" it. @gregg-miskelly Looks ok to me. Should we also add properties that let you specify debug/release and architecture? |
@rchande Sounds good to me. I updated the proposal above. @WardenGnaw do you know if we tweak the |
If we pass in the configuration/platform/framework to |
It occurs to me that another option would be to put a bit of UI somewhere is VS Code to let the user pick the configuration/platform/framework, and make both the TaskProvider and DebugProvider respect that. Thoughts? |
If it's possible to add them to the UI, I would prefer to add configuration/platform selectors over asking people to edit launch.json. Where are vs code extensions allowed to show additional UI? |
@rchande We can add to the status bar. I did a quick test to see how it would look: When users select on that StatusBarItem it can trigger the QuickPick dialog: What we can do is have the quick pick menu items be populated by omnisharp-server by discovering which configuration/platform combination exists and display it as <Configuration>|<Platform>. |
@WardenGnaw That's awesome! Sounds good to me. |
This is great! In the proposal, is preLaunchTask necessary? It duplicates data with the startupProject. Can we reduce this to a single project path? On the same topic, do we imagine using the tasks api to generate a task for each possible build flavor? Or can we just invoke the appropriate build via internal API call? In this scheme I don’t believe that we are asking the user to think about tasks.json at all while debugging, so perhaps we can own the end-to-end in the launcher... |
@TheRealPiotrP Don't we need the Also, I believe we would have a single task for the project. The resolveTask function in the task provider would retrieve the selected configuration and platform, and then pass it into msbuild with the selected parameters e.g. |
I updated the proposal above based on what was discussed in this thread. RE: omitting
|
Hey @gregg-miskelly, Still working on this? We have multiple projects that run in VS, VS Code & Rider. Detecting the program allows the launch.json to be configured only once, and not break when upgrading dotnet versions. This way the VS Code setup can become transparent, and offload all of the dynamic settings to the |
The C# DevKit provides a modern debug experience. |
Behavior Today
Currently our launch.json fully specifies the path to the .NET Core dll to launch.
Current example:
With the new launch provider work, it seems like there might be an opportunity to simplify this, and eliminate the issue that if you change a project from targeting one framework monitor to another, launch will do the wrong thing.
Proposal
startupProject
property to launch.json: Path to the .csproj of that project that will be launched. EitherstartupProject
should be set orprogram
should be set, but not both.#if
code), the build tasks (by following the current platform/configuration/framework when issuing build commands), and the debugger (by debugging that configuration of the startup project). This can be shown in the status bar like the way the current project works. Example:cwd
shouldn't be specified by the template, and if it isn't provided, the resolver should fill it in with the directory of the project.Proposed example:
The text was updated successfully, but these errors were encountered: