Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String error - Variable not found!

Status
Not open for further replies.

Antzz

Programmer
Jan 17, 2001
298
US
Hey Guys,
Need some help here. I am trying to debug an application and when I try to check the value of a string variable in the Debug window, I get the following error :

error: '[variable_name]' does not exist

Any ideas?

Thanks and appreciate it.
 
The JIT compiler might have optimized it to a constant, and so it wouldn't have a "value" per-se. It all depends on how you're using it.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
The variable could be out of scope:

Let's say you have:

if(something == true)
{
string str = "my string";
}

//==>And you decide to break here

In this case the variable "str" will be out of scope since you're breaking outside the 'if' block.

This is just one example of why your variable name wouldn't exist, but it IS more than likely a scope issue.
 
Hey Guys,
It certainly is not a scope issue. Going back to what chiph suggested, this is a possibility but I do not know how it would be doing it or if there is a way for me to change some Debug options in order for me to be able to debug the app in a proper way.

I have tried the debugging with some other applications and it gives me the same problem. It seems like I am doing something stupid which I cannot figure out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top