Debugger holds lock on file after 'debug stop'
This issue has hit me about a half dozen times while debugging a .net core web app on my Mac. The repro steps below are a bit convoluted but the general issues happens in less obvious ways.
Repo steps: open folder 'app' start debugging <break in 'lib'> Modify the code (to cause a rebuild of lib) In the watch window expand this.Roots (to cause the debugger to hold the file lock) Before the dictionary is expanded (not to worry it takes a very long time to do that) restart debugging Either press "debug anyway" or close and "start debugging"
Expected: When the debugger stops it should release the file lock
Actual: The debugger holds a file lock which causes VS Code to fail to build and then debug. Here is the error message: ERROR: Error while trying to enter break state. Debugging will now stop. Failed to find thread 7373 for break event The program '/Users/xyz/Documents/Projects/bug/badimage/app/bin/Debug/netcoreapp1.0/app.dll' has exited with code 42 (0x0000002a).
To make matters worse, I have had my Mac crash twice while trying to narrow this repro down. The cause of the crash is clrdbg process starts to consume memory aggressively and takes down the machine. I have also seen this repro fail with a BadImageException when trying to debug.
.NET Command Line Tools (1.0.0-preview1-002702)
Product Information: Version: 1.0.0-preview1-002702 Commit Sha: 6cde21225e
Runtime Environment: OS Name: Mac OS X OS Version: 10.11 OS Platform: Darwin RID: osx.10.11-x64
VS Code - c# extension 1.0.3-rc2 badimage.tar.gz
This error occurring with me using asp.net core RTM
I am changing the milestone of this from 1.4 to 1.5 because certain aspects of this issue have been fixed but there are still open issues related to this one.
@chuckries: What's the status of this? Is there still more to do here? Are there other issues tracking the details of what's left?
@gregg-miskelly do you recall if this is fixed?
I remember there was some other aspect of this that we wanted to eventually improve, but I don't remember what it was. @rajkumar42 do you remember?
Created an issue https://github.com/OmniSharp/omnisharp-vscode/issues/1215 to track.
@gregg-miskelly I see that #1215 is complete. Any work left to do here?
@JoeRobich I am guessing not. If so, no one would remember anyway.