James's profileJames FinniganPhotosBlogListsMore Tools Help
    January 22

    wt - a better retval test

    Before, I mentioned using the z command as a way to figure out where an error HRESULT was occuring.  (Really, the best way is to have some decent tracing so you can see the failures in a debugger). 
     
    wt is better at this - it's much much faster and adds more flexibility.  wt does a few different things, including a sort of profiler view of the calls made - but the tracing is the most useful to me.  Here's the command I end up using a lot:
     
    wt -l 5 -m shell32 -oR
     
    What does it do?  Well, we execute the function and trace up to 5 levels deep (within shell32 - one level beyond that) and we output the return value.  So, in this way you can trade off between more tracing and less iterations tracking down the problem or less spew and more repeat debugging.  I find 5 levels deep usually helps me spot the problem in one pass - and it's fast.
     
    wt - the next best thing to (but nowhere near as good as) decent tracing in your debug code.

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://jamesfinnigan.spaces.live.com/blog/cns!9062539B2F0077D6!209.trak
    Weblogs that reference this entry
    • None