Host Run Targets for jobs versus/web sites and no debugger by default with EASY attach to debug
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
Right now, when you run the host, it runs everything and debug works fine.
Part 1:
Most of the time however, what you really want is for the services to just run without any debugger, and then be able to quickly attach. Right now VS Code and VS.net have a pretty horrible UX for attaching a debugger. It would be nice for the Aspire team to work with VS.net and VS Code teams to make this a right click, "attach" function. I.e. because you know all about the path to the executable of the service from the csproj, you should be able to find the running process and attach in one click without having to search through the endless dialog that pops up.
So I'd like to be able to tell the Aspire Host to just run the, not debug them, and then be able to attach a debugger to one or more as necessary.
Part 2:
I'd like to be able to create targets that orchestrate based on the one that was run, what the ultimate session purpose was for. I.e. if you are working on a website, you need all of your backend running and the website. This is how it is now. And that's great.
But there is also "I want to debug a job". I want to be able to define and orchestrate that job and all it's dependencies and have it show up in the host and deployment information, but I don't want it running at all, nor debugging unless I say I want to run that target explicitly. (i.e. typically this would be like redis cache, database, and then the project for the job)
I would rather not have multiple hosts just for this purpose, and by defining some sort of command line ability to specify the target, you could have different run profiles and if you could set it in the launchSettings.json of the host project, then VS.net and VS Code could pick those up and offer them as targets.
This would give us the excellent dashboard and give us jobs that are dependent on micro services to run in one click, which really isn't possible unless you want to risk that job running when it shouldn't be.
This also works better for wanting to target a debug session to a specific web property,. So if you have say a public portal and an admin, you only want to debug the portal, but you want it all defined in the host, and you want to just run the host, which will start up all of the micro services that you have to have going etc. and that website but only that website.
In fact, the AddProject (Call it AddProjectEndpoint or something) functionality could be refined to actually only launch if the target or anythin with references to that are the target. This would provide a really simple way of building this out.
And by doing this, then the generate manifest has everything as well which isn't possible right now because of these issues right now.
Contributor guide
Assessment
This issue has not been assessed yet.