blog@mcZen

Software, life, and leisure

Ah, my first bug in VS2008

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

December 7, 2007 5:42 AM

mike

I did it. I found a bug in VS2008 RTM. I'm sure it will not be the first nor the last, but I found one. I'll get to what it was in a moment, but first I want to say that I am really pleased with microsoft at the moment. I finally found the place to go to submit a bug. What amazed me most was that I actually got a response within HOURS! The response actually included a test project where they couldn't reproduce what I had submitted. I simply cleaned up their sample and resubmitted it, showing exactly how to reproduce the error.

If you're curious about my submission, here is the link:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=315555

To Submit bugs about Visual Studio in general you can go here:
https://connect.microsoft.com/VisualStudio

The Error
When debugging javascript in the script explorer and you have multiple javascript filenames that are the same, a breakpoint set on one of the last loaded files moves to the first loaded file upon page refresh. For example, say you have an aspx page that includes several script resources in the form of webresource.axd requests. You want to put a break point into the last loaded webresource.axd. This is all great until the page refreshes. The breakpoint will move to the first loaded webresource.axd on the same line. This is really a pain when you are trying to debug an onload handler, because the break point moves and doesn't get hit.

Of course, you can avoid this all together if your scripts are local, which is really a better idea in general because IIS will handle cache expiration for you since webresource.axd is not cached. (I know this was the case for .NET 2.0, however, they may have changed it in 3.5. I just haven't tried it yet - if you know the answer to this, please leave me a comment!)

Anyhow, another caveat that I ran into was actually setting the breakpoints in those dynamic javascript files. It doesn't appear to load the js in memory initially. It takes a few seconds, so just keep pressing F9 to add the breakpoint... It will eventually load and insert the break point. As a side note, when it doesn't insert the break point you will see "This is not a valid location for a breakpoint" in the status bar - don't worry, just keep pressing F9.

Comments

Comments are closed

Powered by BlogEngine.NET 1.4.5.7