dotnet / project-system

The .NET Project System for Visual Studio
MIT License
967 stars 386 forks source link

Unable to properly debug a netstandard project when starting a external executable #3690

Open Pilchie opened 6 years ago

Pilchie commented 6 years ago

From @Barsonax on May 29, 2018 14:23

Summary

Debugging doesnt seem to work properly when you start a net framework exe from a netstandard project through the Debug Launch setting. Everything else seems to be working fine.

When testing inside a game engine called duality I noticed this behavior. Latter on I found out that I can reproduce this in a separate project as well.

Some background info: In duality you add functionality through plugins which currently are portable projects. We want to eventually change this to netstandard projects. Plugins themselves are not runnable but instead we run duality itself when you try to run a plugin in VS. This will load all the plugins so you can proceed to debugging your plugin.

Note: the attached test project was simplified as much as possible to isolate the problem and thus does not include duality.

How to reproduce

Attachments

Copied from original issue: dotnet/standard#760

Pilchie commented 6 years ago

From @Barsonax on July 3, 2018 6:9

Its been a month and still nothing? Not expecting it to be fixed in that timeframe but some communication would be nice.

Pilchie commented 6 years ago

From @weshaggard on July 6, 2018 22:1

@Barsonax this is more of a tooling issue then an issue with the standard. @Pilchie what is the correct repo to file this issue?

Pilchie commented 6 years ago

:link: Also reported at https://developercommunity.visualstudio.com/content/problem/273462/support-debugging-net-standard-library-used-in-a-n.html

Pilchie commented 6 years ago

Ideally we would be able to sniff the target exe and pick the debug engine automatically. Failing that, allowing specifying the engine in a launchSettings.json would help.

Barsonax commented 6 years ago

Is there any workaround for this problem I can currently use while we wait on the real fix?

Barsonax commented 5 years ago

Bump

Barsonax commented 5 years ago

Just tested with VS2019 and its still not working. Is this ever getting fixed? Its been almost a year by now..

ilexp commented 5 years ago

Any news on this? This is currently a blocking issue that makes switching our project (linked in the referenced issue above) to .NET Standard less desirable, as the project very much relies on users to be able to debug plugin projects they're writing. Manually attaching post-startup isn't always an option, and a usability downgrade either way, especially since some of our users may use VS for the first time.

If we don't want to introduce regressions here, we're stuck with continuing to use PCLs - and that is slowly starting to fall apart due to them being deprecated.

Even a workaround would be greatly appreciated - if there is any config file, environment variable or similar we can automatically set when a user hits "Debug" in VS, that would be great to hear about.

Barsonax commented 5 years ago

@Pilchie @jjmew any updates on this?

ghost commented 5 years ago

I need this too!

tripplet commented 4 years ago

Any update on this issue? Even a workaround would be nice.

Barsonax commented 4 years ago

We have worked around this by not depending on this anymore. We are now launching our application with a completely separate project that targets .NET. Not ideal but in our case it works.

https://github.com/AdamsLair/duality/issues/668

Still its strange that microsoft does not fix such a basic bug nor communicate about it.

tripplet commented 4 years ago

@Barsonax Thank you for the workaround, this didn’t occur to me. I just added a dummy project to the visual studio solution.

ThomasGuglerNagarro commented 6 months ago

still not working with VS2022!!

gunterwiesinger commented 4 months ago

Any News on this? Still not working on VS2022...