Unable to debug code loaded in more than one ALC
See original GitHub issueConsider this setup:
- Library1
- Plugin1 (depend on Library1, via project reference)
- Plugin2 (depend on Library1, via project reference)
- Host (console app)
Host is using PluginLoader.CreateFromAssemblyFile(pluginPath)
to load both plugin assemblies, and calls a “startup” method in them. Plugins call a common method in Library1
.
No shared types and no custom options in use.
If I debug the host, I can step Host -> Plugin -> Library1 when the first plugin is loaded. But when the second one is, I can not step into method of Library1. Also, I see a message (in Debug Output) that Library1
from path of Plugin
can’t load. (Using VS Code to debug, but tested VS 17 too). That part is also confusing, since why shouldn’t it load in the second ALC?
Let me know if you want me to craft a repro.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
c# - Multiple project visual studio solution won't debug one ...
The dlls have not been loaded to the process which you are trying to debug, under project properties check if optimize code is...
Read more >How to use and debug assembly unloadability in .NET
Threads running code from an assembly loaded into the collectible AssemblyLoadContext . Instances of custom, non-collectible AssemblyLoadContext ...
Read more >CCS: How can I debug multiple launchpads simultaneously ...
I'm trying to debug a mesh radio project which involves multiple launchpads all running exactly the same code with CCS, but it won't...
Read more >Why can't the breakpoint be "hit" when debugging an ...
If no breakpoints are hit it's possible an exception is occurring in the constructor and the tool never runs. Check by showing all...
Read more >TS Server fatal error: Debug Failure. False expression ...
False expression: getScriptInfo Verbose Debug Information: scriptInfo for a file 'e:/code/pingtaiqianyi/alc-subapp-purchasemanage/src/__VLS_types.ts' Path: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for sharing. I’m going to close this in favor of https://github.com/dotnet/coreclr/issues/20607
This seems like a bug in .NET Core itself and the way AssemblyLoadContext works. This library doesn’t do anything special with symbols, or do anything to prevent symbols from loading. If there is something this library needs to do to help IDE’s find symbols, I’m happy to add that, but I don’t know what that would be.
I would recommend opening a bug on github.com/dotnet/core to see if the coreclr team can help with this.