First of all, we should understand that the problem of local debugging failure is not a bug. Microsoft has provided an official explanation, which is due to IE browser and.. NET Framework does not take proxy for local requests, so Fiddler cannot detect data. Of course, you can also use the Firefox browser for debugging. Currently, the latest version of Fiddler supports Firefox. But here we also provide a solution in IE browser.
1. use the machine name instead of localhost or 12.7.0.1. For example, you used http: // localhost: 8081/mytestpage. aspx access, which is changed to http: // machinename: 8081/mytestpage. aspx.
2. Use a http://ipv4.fiddler to access localhost on an IPv4 adapter, and use a http://ipv6.fiddler to access localhost on an IPv6 adapter.
3. modify rules,
Update the rule code (locate onbeforerequest and add it ):
Static function onbeforerequest (osession: Fiddler. Session ){
If (osession. hostnameis ("MyApp") {osession. Host = "127.0.0.1: 8081 ";}
}
Then you can access it through http: // MyApp.
4. if it is difficult to change the code as above, the simplest thing is to add a period symbol "directly after localhost or 127.0.0.1 in the URL. http: // localhost. (http: // 127.0.0.1 .).
In short, do not use localhost or 127.0.0.1 for access, and set an alias for access.
How to Use fiddler in Firefox:
First, download and install the latest version of Fiddler. Remember to restart Firefox. The following figure shows the operation status of the fiddler Extension function in the lower right corner:
This indicates that the extension of fiddler for Firefox has been installed. fiddler: Off indicates that the fiddler application is not enabled, because the extension cannot directly initiate the fiddler application, so manually enable this application from the Assembly, and the State will change to the fiddler: on state, and the request and response information of Firefox can be smoothly collected.
Fiddler cannot be debugged locally in IE browser