Visual Studio 2010 - can't see the value of th

2019-07-18 16:49发布

enter image description hereBefore I used to point on the variables and they used to show their values. strong textut after I installed Visual Studio 2010 full version, I can't see variables anymore. Sometimes I would have to do something like that to see te variable:

String var1 = "test";
var1=var1;

Please note, I check variable value after it has been initialized and after the value has been assigned.

The name 'buyCategory' does not exist in the current context

5条回答
劫难
2楼-- · 2019-07-18 17:32
我想做一个坏孩纸
3楼-- · 2019-07-18 17:33

In the screenshot, buyCategory hasn't yet been initialized or assigned. Press F10 and try again.

查看更多
唯我独甜
4楼-- · 2019-07-18 17:36

Open Solution Explorer -> Right Click on Solution -> Select Properties.

After selecting Properties, you will get one Popup window. In the window change configuration Type to Debug and then click Ok.

查看更多
甜甜的少女心
5楼-- · 2019-07-18 17:40

It's possible you are in a different thread as the variable you are trying to see in the Locals menu.

查看更多
时光不老,我们不散
6楼-- · 2019-07-18 17:48

Looks like your break point is on the line that inits the variable. YOu need to execute that line ( F10 / Debug->Step Over ) before that variable will come into existence

查看更多
登录 后发表回答