tags:

views:

355

answers:

2

The debugger does not want to step into an unused variable. If I declare (var x = "hola") it doesn't recognize x and says that it doesn't exist in the current context. When I do some work with x then it recognizes it.

+1  A: 

That line of code is probably optimized away by the compiler... You might be able to step into it if you turn off optimizations.

Kalmi
Yeah that was the solution!, but i didnt remember have turned on that option, is not by default always selected optimize code? well is working now thanks.
It's on by default in Release builds, off in Debug builds. Not sure if VS Express supports this distinction.
romkyns
A: 

What version of Visual Studio are u using?

Juan Andreu