deeptanshuv's WebLog

  • Asp .Net debugging in XP SP2

    A person emailed me requesting me to blog step by step instructions on how to get Asp .Net working on XP SP2, and to check the status for each step.

    I thought this would be a lengthy blog, but on second thoughts realize there isn't anything very deep about Asp .Net debugging.

    With SP2, you can run into two sets of problems with Asp .Net debugging - (a) Asp .Net deployment fails and (b) Debugging fails.

    For the debugging, there are a number of blogs out there - my own blog lists how to get this going, and you have our Dev Lead's blog at http://weblogs.asp.net/andypennell/archive/2004/08/20/217933.aspx that also connects to Gregg's and mine blogs. The most comprehensive place I think is http://support.microsoft.com/kb/833977

    For Asp .Net deployment, there aren't any issues particular to SP2 that I am aware of, but a simple search can find you common deployment errors and how to check the system to flush them out.

    That leaves us with the problem of debugger errors with Asp .Net debugging on SP2.

    First of all, make sure this is not an issue with deployment instead of debugger by running your project outside the debugger (Ctrl-F5 instead of F5).

    Now, assuming that deployment works, debugging fails, confirm that this is asp .net specific by debugging another app (try attaching to notepad.exe, or your simple winforms app). For general debugger failure, refer to the links mentioned above.

    Finally, if you have come this far, you are in a weird situation of specifically asp .net debugging failing. Open your application's web.config file and make sure the debug attribute is indeed set as described at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxtskdebugmodeinaspnetapplications.asp

    Now if you are still failing, it has to be due to failure to attach to aspnet_wp.exe or w3wp.exe or inetinfo.exe. Deploy your app, open processes window (Tools->Debug Processes), check Show System Processes and Show processes in all sessions if necessary, and then attach to the aspnet_wp.exe or w3wp.exe or inetinfo.exe as a native process.

    If this fails, you have a permission problem. At this point, there is no other explanation for it. Check the access permissions of your user.

    If this worked, we are having auto-attach problems. This really should not happen and should be a rare case and there is no specific solution to offer, you can read this blog from Gregg to see what is going on - http://blogs.msdn.com/greggm/archive/2004/07/15/184271.aspx . I am not sure how many people manage to get to this stage - where everything above is working, just F5'ing the project fails. Do let me know if any of you guys ran into this specific issue, and what your underlying cause or fix turned out to be. I would try restarting IIS, restarting mdm (iisreset, net stop mdm, net start mdm).

     

     

  • The case of Turkish İ & Turkish I

    As one of the Internationalization representatives, it is my responsibility to make sure that our automation framework code uses ToUpper() & ToLower() correctly. In almost all cases this does not matter and therefore people don't bother to remember this at all, but if you call the To...() methods with no arguments, you get the conversion based on your system locale, and in one case, your code will break.

    This block of code

    switch (myType.ToLower())
    {
       case "integer" : ;  

    }

    will fail if user enters "INTEGER" on Turkish locale because there I gets converted to ı, not i.

    The correct code here is to use myType.ToLower(System.Globalization.CultureInfo.InvariantCulture)

    This will correctly match I & i irrespective of the operating system locale.


    Basically

    English has two i's => I & i

    Turkish has four => İ & I, plus ı & i.

    With non-turkish locale, I & i are our familiar ones, while İ & ı are unicode characters that are not recognized as characters to covert to. 

    As a result, I & İ both will lowercase to i, while i & ı both will uppercase to I.

    On a turkish locale, the relationship changes.

    i & İ are one upper-lowercase pair, I & ı are the other. (dotted i's together, non-dotted together!)

    Only with InvariantLocale can you make sure that you accidentally do not match the two sets of I's as I & i lowercase & uppercase to each other, while  İ & ı stay unchanged. Therefore you will never end up with "III" == "İİİ" or "iii" == "ı ı ı " as a result of case conversions.

    Right now I am looking at 138 cases of potentially bad ToLower() calls I need to code review & fix!

     

  • Performance reviews take time...

    Oh boy, I wanted to fix some automation bugs today, but could not as I had to update my "commitments" for my performance review. And I need to go home and do my laundry.

    Reviews at MS have changed as we officially become a "large company". Earlier we did not spend time worrying about commitments and what not - you simply listed the work you did and and got graded based on that. That was the whole review. My personal goal was as simple as "work hard(er), make money, have fun" (it was implied, I did not have to write it). Now we need to be mature corporate citizens and define goals accordingly.

    Fortunately Microsoft has not reached the stage where you put in arbit goals like "I plan to proactively leverage my synergies to optimize my throughput all while valueing diversity" (I think this was Wally's [(c) Scott Adams, www.dilbert.com] goal), our goals still are precise, actionable and measurable, and I think I know that we have to evolve as a company, but part of me still feels nostalgic for the days when I could write my review in a couple of hours and there was very little MBA-speak involved.

    I miss the dot-com era.

  • Imaginative hiring techniques...

    So I get this email from a guy on the Windows security team, they are looking for more people and this email was to existing MS employees enquiring if they wanted to move to the team.

    What I liked about this particular headhunting was that instead of asking you to simply send in your resume, they set up a machine with a vulnerability and asked you to break into it and drop your resume into C:\resume. (hacking other employees' machines is a no-no by company policy but this was by permission of the owner). I did not take the offer as I like the debugger team, but I liked this imaginative way of immediately separating the grain from the chaff. I doubt if this technique will be used to scope out non-MS recruits but if any of you out there manage to break into one of our machines do feel free to forward your resume to the Windows Security team from our jobs webpage or even better use the Outlook on the hacked machine.

    (yes, the opening is posted on our external "careers" website)


     

  • Getting Remote Debugging working on Windows SP2

    The security hardening in SP2 affects remote debugging since the firewall blocks machine to machine communication.

    We have a workaround posted at http://support.microsoft.com/default.aspx?scid=kb;%5BLN%5D;833977#2020 that lets you configure your machine to re-enable remote debugging.

    There are a few mistakes in this KB article, however, which we are in the process of correcting.

    These are the corrections :

    The section "Workaround for Microsoft Visual Studio .NET 2002" that lists steps (1) to (7)  needs to be done for both VS 2002 and 2003, though it mentions only 2002. You should also do this right in the beginning.

    Then you can turn on remote debugging, configure the Visual Studio .Net computer and configure the remote computer as described.

  • Beta out!

    Finally, after some pretty exciting last minute drama with the CD's, the VS 2005 Beta is released! I hope you like the new features we have in the debugger, and I hope you like its stability.

    Two of the features I enjoy owning are the new datatips and breakpoints. Datatips are unlike anything you saw in previous versions of VS, and BP has been given a bit of an overhaul to allow setting more conditions, which should be useful to power users. We also support source checksums now, so the old problem of one breakpoint binding to multiple files of the same name is gone.

    What did we do to test the debugger? Well we have a list of testcases that we automate. Most testcases tend to be automated, and we run these on different platforms, under different configurations. Others are done manually in a test pass. We had a 3-week test pass for the Beta release, we had another one back in March which was the real bug-fixing pass, this recent one was just for verification, all non-major issues caught here were moved to the live branch, only "severe" issues were fixed in the Beta tree.

    The quality of the beta release (or product release in general) depends on the variety of platform configurations tested on, and the quality of the testcases themselves. I like to think we have a decent list of testcases, and how we come up with the cases is a different topic altogether. The intangible is how a manual test is performed and how an automated test is written, given a testcase you can perform it as badly or well as you like (testcase : verify that you can step into GetEnumerator from MoveNext for an Iterator - how many types of Iterators do you need to be sure that this is "ok"?), and it is often difficult to say whether the coverage was "proper".

    One measure of goodness of scenarios we use is code coverage, though this is a time consuming activity.

  • Debugger Usage

    The newsgroups give us a good idea of which debugger features are causing the most problems for our users, but it is more difficult to gauge which features our users are using the most. I am guessing Breakpoints/Watch would probably be the at the top, with Modules being one of the less frequently used. I would be interested to know from some of the users here which features they use the most. This is again an ad-hoc sampling, but if you are posting here I bet you are a power user...

    How frequently do you find yourself looking at the callstack? Using the command/immediate window? The processes window?

  • Introduction

    Hi!

    I am Deeptanshu Verma, I am a QA in the debugger team, also involved with Internationalization work. I have at different times owned pretty much every non-script feature in the debugger in my 4+ years here at MS.

    Outside of work I enjoy reading & computer gaming, and am perpetually in the process of starting a regular workout.

    Regards,
    D.V.

     

     

     

More Posts « Previous page

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker