Hi, While debugging a variable in Eclipse that takes "true" but the same takes "false" when i run the code in Eclipse. What are all the possible reasons for this scenario?
Thx
Hi, While debugging a variable in Eclipse that takes "true" but the same takes "false" when i run the code in Eclipse. What are all the possible reasons for this scenario?
Thx
Are you saying that the variable is 'true' during debugging, but become 'false' in normal run?
Several possibilities come to mind. My guess is that your launch configurations are different, and that influences the initialization of the variable.
If your application runs multiple threads (or receives op. system callbacks from another thread or something similar), it is possible, that your application contains race conditions: depending on the execution order different values get assigned.
Using a debugger can change execution times to bring forth the other order.