Plugin Developer DiscussionDiscussion for FogBugz Plugin developers |
||
Am stuck on a NullReferenceException and not sure how to track it down.
Is there any way to run a remote debug session or at least pump out some log messages to a console? Any help would be appreciated. Thanks. For fun, here's my stack trace ;-) System.NullReferenceException: Object reference not set to an instance of an object.Server stack trace: at FogCreek.FogBugz.UI.Forms.DateInputField(String sInputId, String sInputName, String sInputValue, IDictionary dictAttrInput, Nullable`1 fAllowPast, Nullable`1 fAllowFuture) at FogCreek.FogBugz.UI.Forms.DateInputField(String sInputId, String sInputName, String sInputValue, IDictionary dictAttrInput, Nullable`1 fAllowPast) at FogCreek.FogBugz.UI.Forms.DateInputField(String sInputId, String sInputName, String sInputValue, IDictionary dictAttrInput) at FogCreek.FogBugz.UI.Forms.DateInputField(String sInputId, String sInputName, String sInputValue) at ClarkKent.ClarkKent.HtmlDateForm(DateTime start, DateTime end) at ClarkKent.ClarkKent.PageDisplay() at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at FogCreek.FogBugz.Plugins.Interfaces.IPluginPageDisplay.PageDisplay() at FogCreek.FogBugz.__Global.PluginPage(Int32 ixPlugin)
You should be able to use DateInput. Can I ask what you traced the error to? It's entirely possible that the bug is in our code.
As far as debugging goes, the Visual Studio debugger should work. If you're developing on a local FogBugz install, you can do the following: 1. Build your plugin in Debug mode 2. Upload it to FogBugz and hit a page to make sure it is loaded 3. In Visual Studio, under the Debug menu select "Attach To Process" 4. Make sure "Attach To" has "Managed Code" enabled 5. Select your ASP.NET/IIS process, probably either "w3wp.exe" or "aspnet_wp.exe" 6. Right click on a line and add a Breakpoint I haven't tried debugging remotely, but there are lots of resources on the internet for setting up remote debugging of IIS with Visual Studio. Let me know if you are unable to get this working and I'll try to help. |
Powered by FogBugz