Purpose: To debug a published webpage on the local server.
Steps:
· Create an "ASP. NET web application" Project
· Add a row to page_load of default. aspx
Int I = 0;
And set as a breakpoint
· Compile and publish to c: \ Inetpub \ wwwroot \ test1
· In IIS manager, test1 is set as a virtual directory and anonymous access is allowed (how can this item not be inherited from the master station ?)
· Open the network directly in IE without any interruptions
· If you use "debug" --> "attach to process..." In ...", Select aspnet_wp.exe and open the web page.
· If the generate type on the toolbar is changed from the default "debug" to "release", then generate, publish, and attach it to the process ..., The following prompt is displayed:
Optimization or debugging information is enabled when the following modules are generated:
C: \ windows \ Microsoft. NET \ framework \ v2.0.50727 \ temporary ASP. Net files \ a_rsweb \ f821b8d4 \ 5a8489ad \ Assembly \ dll3 \ 4a72ff66 \ %6aba3_1a89c901 \ zucon1.dll
To debug this module, change the project generation configuration to "debug" mode. To cancel the display of this message, disable the debugger option "send a warning if no user code is available at startup.
At this time, the IE web page will not be interrupted.
You can see the loading process in the "View" --> "output" window.
We can see that there are several situations:
1. Skipped symbol loading. The module has been optimized and the debugger option "My code only" has been enabled ".
2. the symbol has been loaded.
The loaded content can also be understood if it is a public module. But some of them are from other modules, and they are also loaded in. It may be handled when the website jumps to another module.
If you clear the c: \ windows \ Microsoft. NET \ framework \ v2.0.50727 \ temporary ASP. NET Files directory (to clear the World Wide Web Publishing Service, that is, the w3svc service can be stopped)
At this time, the append process is not that complicated.
· Change the generation type to "release", and no information is displayed. Therefore, it is often not the cause of the system, but the existence of a DLL in the buffer is caused by release.
Related settings:
From tools> Options> projects and solutions> General, tick show advanced generation configuration, the "configuration" drop-down box is displayed at the top of "project"> "XXX properties"> "generate, the "configuration" drop-down box is different from the "generate type" drop-down box on the toolbar. The toolbar indicates the configuration currently used, here, we only talk about specific configurations.
From "Tools" --> "options" --> "debugging" --> "General", "enable" only my code "(managed only )",
"If there is no sign at startup, a warning will be issued (only on the local machine )"