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? 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
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?
    – 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. 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"])? 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? Oct 18 '12 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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