Debug Mode in SPDisplayRelatedInfo

Coordinator
Jul 6, 2011 at 12:11 PM

From Millard1 in the Issue Tracker: http://spservices.codeplex.com/workitem/8897

Has anyone raised an issue with debug functionality for SPDisplayRelatedInfo? When I add debug: true SPDisplayRelatedInfo does not work (appear) at all. I am using SPCascadeDropDowns with debug: true enabled and that works correctly. I have tried removing SPCascadeDropDowns but SPDisplayRelatedInfo just doesn't work with debug: true enabled.

Coordinator
Jul 6, 2011 at 12:16 PM

Debug mode does different things in each function, but it is implemented in a similar way in SPDisplayRelatedInfo and SPCascadeDropDowns. It will only show you messages if something is wrong. If you want to test it, change one of the options to something you know isn't valid, like changing "Title" to "Titlexyz".

M.


Jul 6, 2011 at 1:14 PM

Hi M,

If I use SPDisplayRelatedInfo and add debug: true SPDisplayRelatedInfo does not render/work at all.  If I remove debug: true then it does work correctly.

I know debug: true does work on other functions as I have got it working with SPCascadeDropDowns correctly.

So it seems by adding debug: true (or false) kills SPDisplayRelatedInfo and any other SPServices in the page.

Thanks,

Mark

 

Coordinator
Jul 6, 2011 at 1:57 PM

My guess is that you aren't adding a comma after the preceding option when you add debug: true.

M.

Jul 6, 2011 at 2:34 PM

A great way to check for correct syntax is JSHint.com or JSLint.com.  It'll give you feedback about your code and let you know where/how you can improve it.

Jul 6, 2011 at 3:52 PM

Of course! Sorted.

Thanks for this.

Thanks also for the heads up on JSHint.com.  I will check them out.