Issue
Locals only displays this
variable while debugging, other local variables are not available in Locals or Watch but can be re-evaluated in Intermediate Window in Visual Studio
Brief
I'm debugging an Xunit test for some code I am writing. The library I am testing targets ASP.NET Core RC1. Here is my project.json
:
{
"authors": [ "Matthew Abbott" ],
"commands": {
"test": "xunit.runner.dnx"
},
"description": "Provides tests for the Fx.Content.Composer package",
"dependencies": {
"xunit": "2.1.0-rc1-build3168",
"xunit.runner.dnx": "2.1.0-rc1-build204",
"Fx.Content.Composer": ""
},
"frameworks": {
"dnx451": { },
"dnxcore50": {
"dependencies": {
"System.Runtime": "4.0.21-beta-23516"
}
}
},
"licenseUrl": "",
"projectUrl": "",
"tags": [ "" ],
"version": "1.0.0-*"
}
When debugging the unit test (I'm using Visual Studio's in built test features), I can set breakpoints, but the Locals/Watch windows don't allow me to inspect local variable declarations. I also do not get variable tooltips for those local variables.
If I copy and paste my statements into Intermediate, they are then added to scope, but I can't debug easily straight off the bat.
Things I've tried
- Ensured I am compiling in Debug mode
- Disabling JIT optimizations
- Reset my Visual Studio settings
Things of note
- I've recently installed Visual Studio 2015 Update 2
- I've restarted the IDE several times without success
- I've restarted my machine serveral times without success
- Not explicitly bound to a unit test debugging session - when I F5 to run, they fail there also
Any help would be greatly appreciated!
Update Based on Victor's comment, I tried stepping through into a method from that unit test, and initially a parameter is available in scope, but a variable defined further down is not.