Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Watch Window not evaluating properties

Status
Not open for further replies.

JoDaCoda

Programmer
Dec 11, 2003
18
US
Hello Everyone,
I am having a problem with the watch window in Visual Studio. Whenever I add in an object to watch, all of its properties values are "Property Evaluation Failed."

MSDN suggests that you make sure your solution compilation is set to debug (duh). Already had that set.

Does anyone have a real fix to this problem?
 
Are you stopped in a function or sub where those watched items exist?

If [blue]you have problems[/blue], I want [green]source code[/green] AND [green]error messages[/green], none of this [red]"there was an error crap"[/red]
 
Thank you for your reply.

Yes, it exists. Here is a portion of my function:
Code:
 gv = CType(fvProgID.FindControl("gvPermitEvents"), GridView)

            [COLOR=yellow red]If gv.Rows.Count > 0 Then[/color]
                rw = gv.FooterRow
                strEventDate = CType(rw.FindControl("txtPermitEventDate"), TextBox).Text
                If strEventDate <> "" Then
                    EventID = CType(rw.FindControl("ddlPermitEvent"), DropDownList).SelectedValue
                    strPermitStatusCode = noi.getPermitStatus(EventID)


                End If
            Else
                strEventDate = CType(gv.FindControl("txtPermitEventDate"), TextBox).Text
                If strEventDate <> "" Then
                    EventID = CType(gv.FindControl("ddlPermitEvent"), DropDownList).SelectedValue
                    strPermitStatusCode = noi.getPermitStatus(EventID)

                End If
I am watching the Gridview object gv. I have a breakpoint on the first If statement (highlighted in red).

My Watch Window looks like this:

-gv {System.Web.UI.WebControls.GridView} System.Web.UI.WebControls.GridView
AccessKey Property evaluation failed. String
AllowPaging Property evaluation failed. Boolean
AllowSorting Property evaluation failed. Boolean
AlternatingRowStyle Property evaluation failed. System.Web.UI.WebControls.TableItemStyle
AppRelativeTemplateSourceDirectory Property evaluation failed. String
Attributes Property evaluation failed. System.Web.UI.AttributeCollection
AutoGenerateColumns Property evaluation failed. Boolean
AutoGenerateDeleteButton Property evaluation failed. Boolean
AutoGenerateEditButton Property evaluation failed. Boolean
AutoGenerateSelectButton Property evaluation failed. Boolean...

As you can see, the Watch finds the object and returns the object type, but all of the properties of the object are not returned.
 
If this is consistent you may have something jacked. Have you tried just hovering over the gv and doing a quick watch, to get the values that way? You can highlight the object that you're interested in, and then hover. it should auto watch right under the mouse.

If [blue]you have problems[/blue], I want [green]source code[/green] AND [green]error messages[/green], none of this [red]"there was an error crap"[/red]
 
Nope. That's hosed too. I guess at this point I'm going to re-install Visual Studio. Thanks for your responses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top