Plugin Developer Discussion

Discussion for FogBugz Plugin developers

Looking for Debug and Logging tools

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)
Martin Zardecki Send private email
Wednesday, June 17, 2009
 
 
I figured out my particular error; it appears I'm not supposed to use DateInput.

Would still be nice to have access to some debugging tools however.

Thanks.
Martin Zardecki Send private email
Wednesday, June 17, 2009
 
 
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.
David Fullerton Send private email
Thursday, June 18, 2009
 
 
Shoot, remote debugging not supported with C# express edition.

Regarding DateInpputField, I was calling as follows:

string startInput = FogCreek.FogBugz.UI.Forms.DateInputField("start", "start", "2009-06-01");
Martin Zardecki Send private email
Thursday, June 18, 2009
 
 
It certainly looks like an error in our code.  I've opened a case.
Jacob Krall Send private email
Thursday, June 18, 2009
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz