The requested item has been unloaded[enums in monodevelop ]
2014-08-22 11:53
330 查看
When you debug in monodevelop, if you try to watch the enum's value,you will get a warn."The requested item has been unloaded"
This is a bug in MonoDevelop, been there for ages, probably won'tbe fixed for the next few years.
I've found the following work around. For every enum in your code,you can add:
This will let you then view the enum casted to an int in the watchwindow. Certainly a dirty solution, but we have to do what we canin these dark times.
or With Debug.log
This is a bug in MonoDevelop, been there for ages, probably won'tbe fixed for the next few years.
I've found the following work around. For every enum in your code,you can add:
public int debugView_enumName {get {return (int) enumName; }}
This will let you then view the enum casted to an int in the watchwindow. Certainly a dirty solution, but we have to do what we canin these dark times.
or With Debug.log
privatestringPropertyDump(object variable) { varstringPropertyNamesAndValues = variable.GetType().GetProperties() .Where(pi=>pi.PropertyType == typeof(string) && pi.GetGetMethod() != null) .Select(pi=>new { Name=pi.Name, Value=pi.GetGetMethod().Invoke(variable, null) }); System.Text.StringBuilder dump = new System.Text.StringBuilder(); foreach(var pairinstringPropertyNamesAndValues) { stringpairAsString = string.Format("Name: {0} Value:{1}{2}", pair.Name, pair.Value, System.Environment.NewLine); dump.Append(pairAsString); } returndump.ToString(); }
相关文章推荐
- Unity3d:The requested item has been unloaded
- The application domain in which the thread was running has been unloaded.
- Error: "The application domain in which the thread was running has been unloaded"
- The event in requested index is outdated and cleared (the requested history has been cleared ) 问题和修复
- 解决错误“Logon Failure: The User Has Not Been Granted The Requested Logon Type At This Computer”
- HTTP Status 403 – Access to the requested resource has been denied
- The file '/ApplicationName/Default.aspx' has not been pre-compiled, and cannot be requested
- HTTP Status 403 - Access to the requested resource has been denied
- How to use the date format that has been setup as default in Settings?
- HTTP Status 403 - Access to the requested resource has been denied
- TOMCAT "Access to the requested resource has been denied" 的解决办法
- HTTP Status 403 - Access to the requested resource has been denied
- Android问题集锦之三:location of the android adk has not been setup in the preferences 错误处理(eclipse)
- SharePoint Designer Check In and Check Out Error – Cannot perform this operation.The file is no longer check out or has been del
- this application has requested the runtime to terminate it in an unusual way
- Given constant integers x and t, write a function that takes no argument and returns true if the function has been called x number of times in last t secs.
- 安装ORACLE 10g时出现An unexpected exception has been detected in native code outside the VM异常的解决方案
- Error: The project file ' ' has been renamed or is no longer in the solution
- HTTP Status 403 - Access to the requested resource has been denied
- Source Insight in Ubuntu+Windows+Samba:has been changed outside of the editor. Do you want to reload the file?