0

I have a project that I upgraded to Visual Studio 2012. It was a web application and everything worked fairly well converting it to VS 2012 and deploying it. My main question is now that I am debugging the code in VS 2012, the variables are not accessible through the debugger (IE: I cannot SHIFT/F9 or Add Watch).

Private Sub FooBar(ByVal mystring as String)
   Dim anotherString as String

   If anotherString.Equals(mystring) Then
      '// Do something really spectacular...
      anotherString = mystring
   End If
End Sub

The variables mystring and anotherString in this instance are not accessible.
I thought it might have been due to the Private accessor of the method but it is not. Does anyone know if there is a setting or a reason that these may not be accessible?

The code is set to compile and deploy to an IIS web application location and not using the debugger postini for the projects. I do build and publish before I attempt to debug.

  • I assume that this is a duplicate of [Step Into Property/Function (F11) doesn't work as expected](http://stackoverflow.com/questions/4873225/step-into-property-function-f11-doesnt-work-as-expected), isn't it? **Edit** probably not since that are local variables. Have you compiled as debug? However, your code won't work anyway since you haven't initialized `anotherString`. – Tim Schmelter Jun 18 '14 at 14:54
  • That was pseudo code so it really doesn't matter as much as try to explain that in the code I am looking at has both passed in parameters and Dim variables that are not accessible. I feel it is more in the fact that the compiled debug DLLs are having trouble. I did not see that particular article but I am able to step into. – Myster October Jun 18 '14 at 15:27
  • I am not sure but my first guess is you are trying to debug your code in release mode, can you verify that? – Karthik Ganesan Jun 18 '14 at 15:33
  • I think I just answered my question. So the issue was the symbols. I had been compiling the code to the BIN, but the symbols were not getting there. I had to configure the compile to another BIN directory and I saw the loading symbols dialog when I started Debugger. Obviously when the pdb is not deployed correctly, even though the code would debug, the variables were not accessible. I still do not know why it let me debug without a good pdb file. – Myster October Jun 18 '14 at 15:41
  • Some time later, after I investigated why I was able to debug but not see the variable's content, I became aware that it was actually a build issue. I have a root web application with client web applications as virtual directories (inherited features of past coders). I had set the projects up to use custom web server and the IIS directory pointed to a build directory that I use for the main project and the client projects. Some one changed the client project to Use Local IIS Web Server and some how the old PDB was there and allowed me to debug, but the variables could not be accessed. – Myster October Jun 18 '14 at 19:05

0 Answers0