Link to home
Start Free TrialLog in
Avatar of spaulissian
spaulissianFlag for United States of America

asked on

You need to find string.cs to view the source fo the current call stack frame

I just recently started having an issue in Visual Studio when running debug mode for a vb.net application that when I try and step through the code (F11) I am now getting a pop up error (see attached) string.cs not found

I have not been able to locate a solution to this online so I'm turning to this group to see if there has been any similar incidents or recommended solutions.
2017-10-06_15-14-45.png
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

It looks like you are trying to step into System.string or another class named string that is not available to the current project.  I cannot see the rest of the code but based on what I can see, my guess is you have a Select Case on a string value and are trying to F11 at that point.  You will need to step over that block.
It looks like to me that at one point you had a file called string.cs in your project and that file could not be found. Did / do you have a file called string.cs. Did you move, delete it?
Avatar of spaulissian

ASKER

The error isn't limited to this project.  It happens with almost any project I try and debug.  I'm not sure if a VB.Net framework update started causing my issue but all of a sudden, I'm getting this error along with an issue where a question mark character appears in the string.

For example:

Dim strTruck as String
strTruck = 'S1234'
debug.print (strTruck)

The output is ?S1234 and this has been happening just in the last month.
I have not seen this before.
Did you see if it was because you were doing F11 (step into) versus F10 (step over) as I said above.  You usually do not want to step into the string operation here because that is standard code and cannot be debugged since you do not have the source.
Yes I have always stepped through the code by using F11 and had never had any issues until the last couple of weeks.
Not sure what to tell you then.  I have had similar issue in the past when I hit F11 on wrong bit of code when I meant to hit F10.  Stepping into code that you do not have source file for will generate this error as it is doing what you said which is to step into code.  Stepping through or over is a different thing all together.  Good luck!
Avatar of Amber Cairns
Amber Cairns

I, too, am experiencing this issue all of a sudden. I wonder if it has something to do with the Windows Update. Can anyone offer a solution? It's driving my crazy trying to debug.
ASKER CERTIFIED SOLUTION
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Kevin. I had that checked at one time, but in my searching for a solution, I came across a recommendation to uncheck that option. I will give it a try and see if that helps.