Debugging FiddlerScript
Asked Answered
G

1

7

Does anyone know how to debug through FiddlerScript?

I tried what seemed like the obvious thing to do:

  1. In the Fiddler CustomRules.js, insert this code:

    if (Debugger.IsAttached) 
        Debugger.Break();
    

(and also at the top of the file: import System.Diagnostics;)

  1. Open the CustomRules.js file in Visual Studio 2010, and then in Visual Studio do Attach to Debugger, selecting the Fiddler process as the debugging target.

  2. Browse to a website.

This half-works: Visual Studio stops when the Debugger.Break() statement is hit, but the problem is, all it shows me is the disassembly window - not very useful! VS doesn't seem give any option to connect the source code in CustomRules.js. I'm guessing that the problem is probably that it needs a pdb file and there isn't one, but it's not clear to me how to provide one.

Goyette answered 12/9, 2012 at 11:15 Comment(1)
Thanks for the reminder, I'll take a look. Unfortunately when you answered, it'd been 5 months since I posted the question and I'd long since given up on the problem of debugging FiddlerScript. I discovered using .NET Fiddler plugins was a lot better than FiddlerScript anyway which circumvented the problem. But seeing as you ask, I'll try and verify your solution during the next week and mark your ans correct if it checks out.Goyette
P
-2

Go to 'Rules' menu -> 'Auto Breakpoints' Clicking 'Before Requests' does the same thing as clicking on the breakpoint button in status bar once and sets breakpoint for all requests. Clicking 'After Responses' does the same thing as clicking on the breakpoint button in status bar for the second time and removes requests' breakpoint and set responses' breakpoints. Clicking 'Disabled' does the same thing as clicking on the breakpoint button in status bar for the third time and disables responses' breakpoints.

You could also refer to this : http://www.mehdi-khalili.com/fiddler-in-action/part-2

Pokorny answered 5/2, 2013 at 19:39 Comment(1)
He means debugging the fiddlerscript, not adding breakpoints on http requests/responsesJannajannel

© 2022 - 2024 — McMap. All rights reserved.