I inherited an ASP.NET application that builds pages with massive viewstate values. As I have been working through it, I assumed I would be able to use Firebug to inspect the output and set breakpoints in the resulting client-side script.
What I have found instead is that whenever Firebug encounters a large viewstate, it completely chokes on rendering the Script tab, making it almost impossible to set and use breakpoints.
What I see in the output is something very similar to this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD> --snipped-- </HEAD>
<body>
<form name="..." method="post" action="..." id="...">
<input
type="hidden"
name="__VIEWSTATE"
id="__VIEWSTATE"
value="/V4dAUdVmVyc2lvbiAzLjAsIGJ1aWxkIDMxIChlbi1VUylkAgUPFgIfAGVkAgsPDxYCHwAFC1RpbSBCb29ybWFuZGQCDw8QDxYCHgtfIURhdGFC
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD> --snipped-- </HEAD>
<body>
<form name="..." method="post" action="..." id="...">
<input
type="hidden"
name="__VIEWSTATE"
id="__VIEWSTATE"
value="/V4dAUdVmVyc2lvbiAzLjAsIGJ1aWxkIDMxIChlbi1VUylkAgUPFgIfAGVkAgsPDxYCHwAFC1RpbSBCb29ybWFuZGQCDw8QDxYCHgtfIURhdGFC
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD> --snipped-- </HEAD>
<body>
<form name="..." method="post" action="..." id="...">
<input
type="hidden"
name="__VIEWSTATE"
id="__VIEWSTATE"
value="/V4dAUdVmVyc2lvbiAzLjAsIGJ1aWxkIDMxIChlbi1VUylkAgUPFgIfAGVkAgsPDxYCHwAFC1RpbSBCb29ybWFuZGQCDw8QDxYCHgtfIURhdGFC
In other words, Firebug gets halfway through the viewstate value, then starts over from the top, rendering everything from the DOCTYPE declaration to the same spot in the viewstate.
While I recognize (and am working on) the fact that there is a problem with the way this application uses viewstate, I am surprised by Firebug's handling of the output. I have the latest versions of both Firefox and Firebug. Is there a setting I can change to make the script tab render correctly? Has anyone else had issues with Firebug and ASP.NET viewstate?