SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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.


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
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
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
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


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.