Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I wonder if we can debug custom field ? Does "attach to process" method works for custom field?

share|improve this question
    
What exactly are you trying to debug? –  John Chapman Oct 18 '12 at 17:17
    
i developed and deployed a custom field. when i add this custom field as a column to a list, i get some exception. so i want to trace it down. –  ozdogan Oct 18 '12 at 18:00

1 Answer 1

up vote 1 down vote accepted

You can debug the custom field by using the Attach to Process, and attach to your w3wp process for your site.

Alternatively, you can use CKS extensions in Visual Studio, which will attach you automatically.

HTH

share|improve this answer
    
and when does the visual studio hits breakpoint? any time the field rendered? on list item entry and display? –  ozdogan Oct 18 '12 at 18:48
1  
Any time the field is displayed in the form views. The list views are handled via the XML file, which doesn't debug. –  David Lozzi Oct 18 '12 at 19:00
    
Actually my main problem is, i cannot get the value of the column that is type of my custom field from code. when looping through list.Fields, when it comes to the index of custom column, it throws exception: "Exception has been thrown by the target of an invocation" –  ozdogan Oct 18 '12 at 19:08
1  
can you use the field in the list via the browser? Are you converting the value into your field class, or just getting to string? i.e. item["Custom Field"].toString() or new CustomField(item["Custom Field"])? –  David Lozzi Oct 18 '12 at 19:11
1  
I've recently made a custom field, and we're pulling and pushing from it, so I know it's possible ;) What type of field is it inheriting from? Try grabbing it via PowerShell, see if you get a different error? –  David Lozzi Oct 18 '12 at 19:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.