Skip to content

A simple reproduction for a Visual Studio debugger bug involving .NET Core and multiple AssemblyLoadContext(s) that completely cripples the debugger.

License

Notifications You must be signed in to change notification settings

Sewer56/VisualStudioNetCoreALCDebuggerBug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visual Studio Debugger Bug

Bug Report

This repository hosts a simple reproduction for a specific bug I found while working on Reloaded-II Mod Loader. The bug consists of AssemblyLoadContext(s) and Visual Studio debugger's inability of picking the correct module for the current ALC while debugging.

The Bug: Summarized

  1. Create an AssemblyLoadContext. In the ALC, load an outdated version of a library.
  2. Create a second AssemblyLoadContext. In the second ALC, somewhere in code, return a value from an API not available in the outdated version loaded by the other ALC.
  3. Place a breakpoint after that API access, inspect the value.

Expected Result: Returned value can be viewed as normal.

Actual Result:

Name Value
integerAsReference error CS7069: Reference to type 'RefPointer<>' claims it is defined in 'Reloaded.Memory', but it could not be found

Works with any external library.

The expression evaluator is completely broken, you cannot query or modify any variable anywhere. Watch list does not work, autos and locals are empty, etc.

Using the Reproduction

  1. Open hello-world.sln.
  2. Build Solution.
  3. Breakpoint in MyPlugin2.cs, variable breakpointMe.
  4. Try to inspect integerAsReference.

Disclaimer(s)

The reproduction is a modified version of the hello world example of the DotNetCorePlugins library by Nate McMaster. I'm also a contributor of said library.

About

A simple reproduction for a Visual Studio debugger bug involving .NET Core and multiple AssemblyLoadContext(s) that completely cripples the debugger.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages