1

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

2
  • What exactly are you trying to debug? Commented Oct 18, 2012 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. Commented Oct 18, 2012 at 18:00

1 Answer 1

2

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

10
  • and when does the visual studio hits breakpoint? any time the field rendered? on list item entry and display? Commented Oct 18, 2012 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. Commented Oct 18, 2012 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" Commented Oct 18, 2012 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"])? Commented Oct 18, 2012 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? Commented Oct 18, 2012 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.