Search code examples
asp.netvisual-studio-2010debuggingvisual-studio-debugging

Debugging in Microsoft Visual Web Developer 2010 Express


Learning MS Visual Web Developer and ASP.NET 4.0. Rather than using the debugging option in MS Visual Web Developer, I seem to prefer to view the page source and hover over the areas that are underlined in the green squiggly style. When I hover over them, it tells me what's wrong, and then I just figure it out what to do from there.

For one particular instance, I had:

<td background="images/separater.png" width="5">

After hovering over it, I replaced it with this:

<td style="background-image: url(images/separater.png)" width="5">

After making the switch, the green squiggly line disappeared, so I assume that, in effect, I debugged that particular snippet. I believe I just made it compatible with the ASP.NET 4.0 Framework.

The only green squiggly lines I leave alone are the ones from social plugins like Facebook plugins. Anyway, my question is: Is what I'm doing (a) correct, (b) important, and (c) just as good as using the debugging option in MS Visual Web Developer?


Solution

  • Most ASP.NET developers would not consider this debugging, since you were not using the Debug command F5 to debug server-side code (usually C# or VB.NET code). See Walkthrough: Debugging Web Pages in Visual Web Developer for more details on that process.

    What you refer to as green squiggly lines are actually warnings about your HTML. In this case the background attribute for tables is not a part of the official HTML specification and this is what Visual Web Developer Express was warning you about. Consequently, you did not make your code compatible with the ASP.NET 4.0 Framework, but you did make your markup HTML-compliant.

    If your code is not compatible with ASP.NET 4.0 you will usually the the yellow screen of death, at which point you may need to debug to find the cause of the error or exception

    Example yellow screen of death

    To answer your question(s): what you were doing is (a) correct, is (b) important for browser-compatibility, is not (c) related to the debugging capability in Visual Web Developer Express.