The VS7 Debugger Doesn't Work. What Can I Do?
By min kwan park (mkpark@microsoft.com / Visual C # debugger qa team)
Introduction
During the last several months, I have dealt with many users from both inside and outside of Microsoft who have debugging issues. I noticed that there are many common mistakes and problems that can be solved, if users are provided with proper diagnosis. Hence, I 'Ve Written this document to provide you with this information......................
This Document Contains:
Error Message Dialog or Description of Error Situation The Causees for ERROR How to FIX The Problem.
And i especially thanks to vc # debugger team and other people what document with various feed back.
Also, please don't hesitate to contact me for new issues or any other commerss. I'll be happy to work with you to improw this document.
Debugging issues
ASP.NET Debugging
* If You can't Find The Error Message That You're looking for in this section, please check The section wessues or remote debugging issues.
Message: Unable to Start Debugging on the Web Server
Error While Trying to Run Project: Unable to start debugging on the web server. WOULD YOULD YOKE TO DISABED FUTURE Attempts to debug asp.net features?
Case 1: Your IIS application of IIS is not configured to use "integrated Windows authentication" Please make sure that the "integrated windows authentication" checkbox on the "authentication method" dialog box is checked..
Case 2: Please check parable i Iis is checked or not. If it is usned off, you may need to turn it on and try your debugging again.
Case 3: if you see "0x8013134b" error code on output window, you may have two different versions of CLRs In that case, you need to register "aspnet_isap.dll" from the CLR which is matched your VS version.Message:. You Do Not Have Permission to Debug The Server
Error While Trying to Run Project: UNABLE to Start Debugging on The Web Server. You do Not Have Permissions To Debug The Server.
Verify That You Are A Member of the 'Debugger Uses' Group on The Server. WOULD you like to disable future attempts to debug asp.net pages for this project?
Cause 1: Make sure that "Integrated Windows Authentication" is enabled Probably, you enabled only "Basic authentication" for Directory security of IIS Cause 2:.. If you are using "Integrated Windows authentication", you need to make sure that your user account has full control on the directory of the IIS Cause 3:. If you created the web project with a full machine name (like "machinename.domainname.something"), the web site is recognized as "Internet" site So the default. setting of IE will impact on the behavior of log on. in this case, you need to enable logging on with your current user account in "Internet" area with IE setting. But it is not the default setting of IE, so you'd BETTER OFF IF You Create Project with Only The Machine Name.
Cause 4: If your Devenv (7.1) is on Window2K3 and has remote server, in this case, you may add the remote machine into trusted site list however the default security setting of trusted site in IE is using "Automatic logon only in Intranet. Zone ".. so you may see this error if so, you want to change Logon option to" Automatic logon with current username and password "However to be more secured, you may want to change the option back after debugging.Message:. Server Side-Error Occurred On Sending Debug HTTP Request.
Error While Trying to Run Project: Unable to Start Debugging on The Web Server. Server Side-Error Occurred On Sending Debug Http Request.
Make sure the server is operating correctly. Verify there are no syntax errors in web.config by doing a Debug.Start Without Debugging. You may also wan to refer to ASP.NET and ATL Server debugging topic in the online documentation.
WOULD you like to disable future attempts to debug asp.net Pages for this project?
Cause 1: Your Web Application Doesn't Have An Application Name. Please check the property of the Web Project Using The IIS MMC TO ENSURE That Your Web Project Has An Application Name
You ued to create an application name for debugging.
Cause 2: if you are for use "ASPNET" HASE Make Surege ON "Wwwroot" Or Your Folder for Virtual Directory to Access and Write on The Folders.
Message: The project is not configured to be debugged.
Error While Trying to Run Project: Unable to Start Debugging on the Web Server. The project is not configured to be debugged.
For ASP.NET Projects, Verify That You Have a Valid Project File Called 'Web.config' for the Url Specified and 'Debug' Is Set To 'True' In That File
For ATL Server Projects, Verify That The 'Debug' VERB IS Associated with Your Isapi Extension.would You Like to Disable Future Attempts To Debug Asp.net Pages for this Project?
Case 1: You NEED To Make Sure That Your Web Is Configured for Debugging. To do this, you need set "debug = true" in the "web.config" file. You May Find this file in your Web Project Folder.
Case 2: For VS7.1, if you see this error message, check whether in IIS you have the Default Website mapped to a static IP address and NOT All Unassigned If so, please create project with "http:. //
However in this case, you need to make su consisting the IP address is trusted site list and automatic log on is enabled for trusted site.
Can Start Debugging without Error Message, But Breakpoints Are Not Hit.
You Started Debugging with "F5" and it looks like debugging is started properly. But you can't Hit A Breakpoint on My Code Behind Code.
Cause 1: Please make supe "ASP.NET Debugging" is enabled in the profmentness of project.
In The Case of VB Project, The Ui IS Different. But you can recognize the equivalent one easily.
Cause 2: Please make sure.. You can check it with "modules" Window.
Message: The debugger is not prof process.
Error while trying to run project: Unable to start debugging on the web server The debugger is not properly installed Run setup to install or repair the debugger Would you like to disable future attempts to debug ASP.NET pages for this project...?
If you see this problem, please check debugging with console application project And if the console application project shows the error message likeError while trying to run project:. Unable to start debugging.
Unable to start program '
The debugger is not all process. Run setup to install or repair the debugger.
IT means That Your .NET Framework is not installed properly. So you need to register "mscordbi.dll" manly by Executing "Regsvr32 mscordbi.dll".
Message: The Server Does NOT Support Debugging of asp.net OR ATL Server Applications.
Error while trying to run project: Unable to start debugging on the web server The server does not support debugging of ASP.NET or ATL Server applications Run setup to install the Visual Studio .NET server components If setup has been run verify that... A Valid Url Has Been Specified.
You May Also Want To Refer to The ASP.NET AND ATL Server Debugging Topic in The Online Documentation. WOULD YOUKE TO DISABE FUTURE Attempts To Debug Asp.net Pages for this project?
If you have an XP Pro or W2K Pro machine, you may need to think about the order of installation between VS7 and IIS. If you install IIS after VS7, you will get this error. In this case, please register "aspnet_isapi.dll" With "aspnet_regiis.exe -i".
Message: Access Is Denied. Verify That You Are An Administrator OR A Member of ...
Error Whileing to Run Project: Unable to start debugging.
Access is denied, Verify that you are an administrator or a member of the 'Debugger Users' group on the machine you are trying to debug. After being added to the "Debugger Users" group, you must log off and log back on for the Setting to apply.
Case 1:
You may not be the member of "Debugger users" group on the machine Please add your user account into "Debugger users" group on the machine.To add your user account into "Debugger users" group, you need to do the following.:
Log in as "administrator"
2. Run "Computer Management" in "Administrator Tools"
3. Choose "Local Users and Groups / Groups" Node
4. Double-Click "Debugger Users" Group on Right Pane.
5. Click "Add" Button On "Debugger Users Properties" DIALOG BOX.
6. Type Your User Account and Click "OK" button.
Case 2:
If You Machine HAS XP SP2 or W2K SP4, Make Sure That "Seimpersonate" is allowed to 'aspnet "User Account.
Message: Could Not Start Asp.net OR ATL Server Debugging.
Error While Trying to Run Project: UNABLE to Start Debugging on The Web Server. Could Not Start ASNET OR ATL Server Debugging.
Verify That ASNET OR ATL Server Is Correctly Installed On The Server. WOULD YOKE TO DISABLE FUTURE ATTEMPTS to DEBUG ASP.NET PAGES for this project?
Case 1: You May Have Installed "IIS Lockdown" Tool. If So, please find "Urlscan.ini" file, and add "debug" in "section in" Urlscan.ini "file.
Case 2: if you are for domain controller As Server, and Your Project Is Created with Machine Name Than Full Domain Name, You May Need To Change The Url of Project To Use Full Domain Name.
Case3: if Your IIS IIS Set To Use Dedicated IP As "Web Site IIS MMC), You May This MMC), You See this Error Message. In this case you need to change your project name to . use the IP address directly For existing project, you need to change project to use IP address than just machine name by editing ".sln" file and ".webinfo" file.Case4: if you do change the value "
Message: Access is Denied.
Error While Trying to Run Project: UNABLE TO Start Debugging on The Web Server. Access Is Denied. WOULD YOUKE TO DISABED FUTURE Attempts To Debug ASP.NET PAGS for this processing?
oral
Error While Trying to Run Project: Unable to Start Debugging on The Web Server. Access is Denied.
case 1:. You may be the member of "Debugger users" group, but you do not have the right to debug the aspnet worker process, because you are not the "aspnet" user account or the member of "Administrators" group Please Add Your User Account To The "Administrators" Group on The Machine.
case 2:. You need to make sure that your user account is admin or same user account of ASP.NET worker process currently CLR debugging service has security restriction to allow only admin or same user to debug managed process so unless you are admin or. Same User, You can't debug asp.net worker process (w3wp.exe on IIS6-windows 2003 or aspnet_wp.exe on other osses). If You can't be admin on the Server Box, But you have windows 2003 Server, you have a work-around by using separate app-pool. the detail information is on section 6.2 of http://msruniv.corp.bcentral.com/shared documents/dotNETDevSvrDEVELOPER2003.doc document.Can't debug with an included File
INSIDE OF ASPX, You Can't Debug with An Included File. It May Easily Happen, When You Convert Old ASP Project To ASPX.
If you include file with "", You May Not Be Aable To Debug The include File Properly. In this case, you need to us " ".
After Changing your password, you need to log off / log in for asp.net debugging.
After You Change your password, you need to log off and log in to do asp.net debugging profrly.
After Installing Windows2000 SP4, ASP.NET Debugging Doesn't Work and It Says "Access Denied".
After Windows 2000 SP4, if You ASP.NET Debugging Doesn't Work By Pressing "F5" and it Says "Access Denied", please re-register "aspnet_isap.dll" rassvr32 -i aspnet_isap.dll ". IT Will FIX The questionm.
Can Hit Breakpoint Only When the page is loaded first time.
THERE MAY BE SEVERAL DIFFERENT CASES OF THIS PROBLEM. But One of Well Known Cases Is That You May Turn on Page Cache Option in "Web.config" file.
If You See Something Like "
In vs.net, We Have TWO Things to decide WHETHER USER CAN Start Debugging. One IS "Debugger Users" Group and the Other IS User PrivileGe Administrator or Power User Or Sedebug.
Debugger users group decide whether the user can access VS debug component (mainly MDM-Machine Debug Manager- which is part of VS). So being the member of debugger users group means that you are guaranteed for accessing MDM. So at this point, you CAN Debug Your Open Process And See The List of Process On Your Machine.
But after this, whether you can debug other user's process is decided by your privilege. For example, if you want to debug other people's native process, you should have SEDebug privilege. For the other users' Managed process, you should be administrator on the Machine.
.
We have a sort of work-around. Cassini is stand-alone small ASP.NET server. So for students, they can use Cassini for developing things, and later they just need to deploy thing over to the actual server for submit the result. The Cassini Is Available on http://www.asp.net/projects/cassini/download/.
Message: No managed code is running .. (7.1)
When Start Asp.net Debugging:
Error while trying to run project: Unable to start debugging on the web server There is no managed code running in the process In order to attach to a process with the .NET debugger, managed code must be running in the process before attaching... When Do Any Managed Code Debugging:
Error While Trying to Run Project: Unable to Start Debugging
Unable to start program
The .net debugger. Click help for more information on how to repairly. Click. Click help for more information on how to repair the .net debugger.
IF you installed vs7.0 and vs7.1 TOGETHER AND UNINSTALL VS7.0 AND You can't do asp.net debugging with the error the installation of 1.1 CLR. IT Will Solve Your Problem.
General Debugging
The console application "Project Type.
Message: Unable to start debugging. Unable to start program ...
Error Whileing to Run Project: Unable to start debugging.
Unable to start program '
The debugger is not all process. Run setup to install or repair the debugger.
You can't Start Debugging Because "mscordbi.dll" is not register it manterial.
Message: unable to start debugging. Access is Denied
Error Whileing to Run Project: Unable to start debugging.
Access is denied verify that you are an administrator or a member of the 'Debugger users' group on the machine you are trying to debug. After being added to the 'Debugger Users' group, you must log off and log back on for the setting To apply.
Please make sure what "Machine Debugger Manager" Service is Started Properly.
Please Check That You Are The Member of "Debugger Uses" Group or "Administrators" Group.can Start Managed Debugging, But PDB IS Not Load. So, Can't Hit Any Breakpoints At ALL.
If You CAN Start Debugging and debuggee is launched profr, but you couldn't Hit any bp, you may need to check the installation of "DiAsyMReader.dll".
The File May Not Be Registered. So you need to register it manually.
To Register IT, You NEED TO DO
Find Out "DiasymReader.dll" Regsvr32 DiasymReader.dll
Managed debugging is not working
You attach to native process in CLR Mode Before the process. Managed debugging is not working.
Solution 1: attach to the process after clr code is buy.
Solution 2: attach to the process in interop mode. In this case, you don't have to attach to the process after clr code is invoked.
Managed Debugger Doesn't Respond
WHEN You Start Debugging with Managed Code, The Debugger Doesn't Respond At All.
".NET Framework Support" service is stopped and disabled forever. (Just Stopping the service is not enough.)
If you don't have ".NET Framework Support" Service, please disable "IIS Admin" service. It May Help You.
Stepping with c # code is not correct ...
Consider The Following Code
String SomeStr; SomeStr = "SomeValue"; if (SomeStr == NULL) Console.writeline ("What's UP?");
Try {} catch (Exception E) {} if you step thiving this code, you will see when you step @ in "i" statment, the instruction Pointer is Moved to the body ("console.writeline (" What's up? " );. ") of the" if "statement This is not debugger bug, it is known issue with try catch block debug information See the followingdisasembled codeif (someStr == null) 0000002a cmp dword ptr [ebp-18h], 0 0000002e. JNE 0000003C
Console.writeline ("What's UP?"); 00000030 MOV ECX, DWORD PTR DS: [01C50070H] 00000036 Call DWORD PTR DS: [02F0257CH] 0000003C JMP 00000048
Catch (Exception E) 0000003E MOV DWORD PTR [EBP-1CH], EAX 00000041 Call 762c0846 00000046 JMP 00000048
} 00000048 NOP
When the value is not matched, the instruction pointer is moved to "3c" line, but the line is mistakenly matched with the body of "if" statement. While the code functions correctly, the appearance is incorrect.
Causality Debugging: Stepping Between Web Service Client and Web Service.
Can't set from Web Service Client INTO Web Service
With the default settings, you can't step from Web Service CLIENT INTO A Web Service. It Works Like Step-over.
The ASPNET worker process (aspnet_wp.exe or w3wp.exe) is running under the "aspnet" or "network service" user accounts, and these accounts do not have privilege to MDM via access DCOM. So you need to add these accounts into The "debugger users" group.
After Enabling Impersonation Of Web Service, Can't Do Causality Stepping.
When impersonation is enabled for the web service with "web.config", stepping into from web service client code to web service code is not working. So it works like step over.You need to do these things for correct stepping between client and service . - turn off "Anonymous access" in IIS - change your clinet code to set credential to webservice like Service1 obj = new Service1 ();. obj.Credentials = System.Net.CredentialCache.DefaultCredentials;
After this, you will be aable to step in the Web service from client.
These are needed, because when you step into web service, some framework components need to use the system level debugger component (MDM) to cocreate it. If you do not give your proper credentials, it just fails to do the "cocreation". WITHOUT THESE THE PREDENTIALS, "Step Into" Works Like "Step over"
Debugger hangs
IF Your Web Service Client Code Is Running In Sta (Single Thread Apartment) Model, And It Is Waiting for An Async Call Completion Like:
Service1 Obj = new service1 ();
System.iasyncResult ar = obj.beginhelloworld (new system.asyncCallback (class1.handle), obj); while (ar.iscompleted! = True) {system.threading.thread.sleep (1000);
THE DEBUGER WILL HANG. THIS HANG OCCURS BECAUSE One Debugger Component Is Locked by Your Code Inside of Debugger
SOLUTION 1:
Change your code to use thread sync with event or mutext.
Solution 2:
Unregister "csm.dll". In this solution, it will disable causality stepping (stepping from web service client code to web service method). You may need to attach to "aspnet_wp.exe" manually for debugging web service.
Remote Debugging
Can't see any pro recogns on a remote machine
CAN't See any procedes on a remote machine.please make sure that you installed "Remote Full Debug" setup on the remote machine, and then you are a member of "debugger users" group.
Can't Connect to a Remote Machine Because of RPC Issue
* this information is from one of kb articles. Thanks for "Mike Clay" Who Wrote this KB.
If you see the below error message while you are connecting to remote machine with "processes" Dialog.
Error While Trying to Run Project: Unable to Start Debugging on The Web
Server. Not enough Storage Is Available To Complete this Operation.
OR, you see the bellow, during asp.net debugging.
Error While Trying to Run Project: Unable to Start Debugging on The Web
Server. Unable to map the debug start page url to a machine name.
Please make Sure That RPC is Working Properly Between Your Machine and The Remote Machine. The Reason of RPC Issue Can Be from
1. Debugging through a firewall. Microsoft Does Not Recommend or Support Remote
ASP.NET Debugging Through a firewall. The Best Way to Do Overcome this is use
Terminal Services to log t.............
2. One Common Failure for rpc is the inain ney to resolve the remote machine
Name. RPC Relies on Name Resolution for Communication Between Machines. IF
You are unable to resolve the remote servers machine name to the correct ip
Address Errors May Occur.
3. RPC Traffic Can Flow in One Direction But Not The Other. RPC Traffic Must BE
Able to go from the machine used to do the debugging to the remote server and
From The Remote Server Back to The Machine Used To Do The Debugging in Order
TO SuccessFully Debug Remotely. Make Sure That RPC Communication is enabled
IN Both Directions.
To Analyze your rpc, you can use "rpcping" Tool.Remote Debugging Fails with Machines On A Work Group
You Have Two Xp Pro Machines That Are Not On A Domain, But on A Work Group. When You Do Remote Debugging Between THEM, You Can't Access Remote Machine At All. What's Wrong With it?
In The Work Group Environment, You NEED To Make Sure That You Have The Samenamed User Account On Both Machines with the Same Password. If NOT, DCOM WILL Fail to Authenticate you.
There is one more considration:
On XP Pro, Because The Default Security Setting for "Sharing and Security Model for Local Accounts", this Remote Debugging is not allowed by Default. Below Are The Steps To change this Setting:
1. Run "Local Security Settings" in Administrator Tools.
2. SELECT "Security Settings / Local Policies / Security Options.
3. Change "NetWork Access: Sharing and Security Model for LocaCcounts" from "Guest Only - Local Users Authenticate As Guest" to "Classic - Local Users Authenticate As Themselves".
4. After this, you need to reboot the Machine.
This Change Should Be Applied ONTO Both Machines for Remote Debugging.
After You Make The Setting Change, You Will Be Able To Do Remote Debugging with The Same Name User Account on Both Machines.
Please make Sure That your User Accounts on Each Machine Has Password. In Some Cases, WITHOUT ACTUAL Password It Doesn't Work.
However, *** there is a concern with security with this change you change default settings of the security model, IT CAN Expose:
UNEXPECTED FILE Sharing Unexpected DCom Components Sharing.
Before you make this change, any kind of connection from remote machine to your machine was guaranteed as "Guest", but after this change, he / she could be authenticated with your local user account. So, like the case of debugging, if you are sharing out a folder or DCOM object, there is a possibility that any matched user (same user name and same password) on other machine could access your shared objects.I strongly recommend that, if you want to use this work-around, you .
After Installing Windows XP SP2, Remote Debugging Doesn't Work.
Windows XP SP2 has better firewall system. And by default it disable remote debugging. If you want to do remote debugging with Windows XP SP2 system, please check http://msdn.microsoft.com/security/productinfo/xpsp2/default.aspx Pull = / library / en-us / dnwxp / html / xpsp2remotedebug.asp link for more information. It has IT HAS INSTRUCTIONS TOEABLE Remote Debugging with Windows XP SP2 and VS7.0 / 7.1.