今天用.NET2008调试一个项目时遇到一个问题:进入DLL项目后,点击右键监视类变量,不能显示变量值,显示“it is not available at this instruction pointer, possibly because it has been optimized away.”错误。
解决方法如下:
1.在项目上点击右键选择属性[Properties],打开属性窗口;
2.切到[Build]选项中,将[Optimize Code]取消选中状态 OK