I wonder if we can debug custom field ? Does "attach to process" method works for custom field?
-
What exactly are you trying to debug?John Chapman– John Chapman2012-10-18 17:17:52 +00:00Commented 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.ozdogan– ozdogan2012-10-18 18:00:03 +00:00Commented Oct 18, 2012 at 18:00
Add a comment
|
1 Answer
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
-
and when does the visual studio hits breakpoint? any time the field rendered? on list item entry and display?ozdogan– ozdogan2012-10-18 18:48:43 +00:00Commented Oct 18, 2012 at 18:48
-
1Any time the field is displayed in the form views. The list views are handled via the XML file, which doesn't debug.David Lozzi– David Lozzi2012-10-18 19:00:40 +00:00Commented 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"ozdogan– ozdogan2012-10-18 19:08:56 +00:00Commented Oct 18, 2012 at 19:08
-
1can 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– David Lozzi2012-10-18 19:11:35 +00:00Commented Oct 18, 2012 at 19:11
-
1I'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– David Lozzi2012-10-18 19:26:47 +00:00Commented Oct 18, 2012 at 19:26