Showing posts with label debug. Show all posts
Showing posts with label debug. Show all posts

Thursday, 8 December 2011

My tool belt - Tools

BgInfo: System info on your desktop background. http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx

Many of the following are very useful debug tools.

DB Tools:
* VS 2008 and VS 2010, Schema Compare and Data Compare tool.

DB Performance Tools:
SQLDiag - Data collector
PSSDiag - Configure SQLDiag
SQLNexus - Data Reporting tool
PAL (Performance Analysis of Logs)  
Troubleshooting Performance in CRM: Data Tier Part 1 – Capturing the Data

Crm server tools:
* Crm Event Listner
* Crm diagnostic tool for server - CrmDiagTool4. The tool will need to be downloaded separately.
* Crm Log Viewer
* MS CRM Plug-in Debugger. http://archive.msdn.microsoft.com/MSCRMPluginDebugger
http://blogs.msdn.com/b/crm/archive/2008/05/12/testing-crm-plug-ins.aspx
* View Crm 4.0 hidden privileges
http://blogs.msdn.com/b/crm/archive/2009/08/04/viewing-all-crm-privileges-including-hidden-privileges.aspx
http://archive.msdn.microsoft.com/CrmSecurityReports

Crm 2011 tools:
OData Query Designer

Crm Client Libraries:
XrmServiceToolkit

Crm Client tools:
* Microsoft Dynamics Crm Office Client Diagnostics - For debugging on a client. This tool come with Crm Outlook client and does NOT require a separate installation.
* Crm configuration wizard
* Client tracing

Windows Debugging Tools:
* User Mode Process Dumper
http://www.microsoft.com/download/en/confirmation.aspx?id=4060

* Windows Driver Kit WDK
http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx

* How to use ADPlus.vbs to troubleshoot "hangs" and "crashes"
http://support.microsoft.com/kb/286350

* IIS Exception monitor

Dev tools:
Productivity Power Tools

Checksums tool:
HashCheck

Screen share tool:
* teamviewer
* netviewer

Presentation tool:
* ZoomIt - http://technet.microsoft.com/en-us/sysinternals/bb897434

Online tools:
* https://github.com/

Disk De-fragmentation tool:
Auslogics Disk Defrag Free
Ref:
http://www.hanselman.com/blog/TheBestVisualStudio2010ProductivityPowerToolsPowerCommandsAndExtensions.aspx

WinDirStat - Shows you how big are each folder
http://windirstat.info/

Assembly reference analysis tool:
Assembly Binding Log Viewer (Fuslogvw.exe)
Orca - Modify MSI file

File compare tools:
KDiff
DiffMerge
WinMerge
BeyondCompare (NOT FREE)

Office:
http://www.libreoffice.org

Tuesday, 1 November 2011

Programming and debugging tips. Debugging Crm tips

* Look deeper under the hood: Reflector, Sql Profiler, Debugger, VS Tracing, Tracing File, Log Files, Windows Event Logger...
* Compare with working version: svn, different version of database...

* if crashes on create, debug the constructor
* Always Set Stop On Exception While Doing Debugging in Visual Studio 2005 or 2008
Menu -> Debug -> Exceptions... -> Tick all the check boxes
* Attach to w3wp is unstable. F5/debug may show you more debug info
* Debug window "Call stack", "Immediate" and "Disassembly" are very useful.
* Use break point's hit count, stop condition and when hit (you can print when the statement is hit)

--Crm--
* Turn on DevErrors in web.config
* For Crm client, run the diagnosis tool.

Tuesday, 18 October 2011

Troubleshooting the Microsoft Dynamics CRM Client for Outlook

http://blogs.msdn.com/b/crm/archive/2009/05/29/troubleshooting-the-microsoft-dynamics-crm-client-for-outlook.aspx

Troubleshooting Client Configuration

Check Managed Passwords:

When logging in through Internet Explorer from the client machine do you Get Prompted for Credentials?
Set “Automatic Logon with current user name and password” for the zone where the CRM URL was located. In Internet Explorer click Tools-Internet Options then under Security check the custom level options for User Authentication and select “Automatic Logon with current user name and password”
Remove Stored Passwords which are located in Control Panel | User Accounts | Managed Passwords
If you’ve upgraded from the 3.0 Client:

Remove the MSCRM Data File and CRM Address Book Provider per steps in KB 948312 (http://support.microsoft.com/kb/948312)
If still failing: Uninstall 3.0, uninstall and reinstall CRM 4.0.
Permissions Issues when configuring:

The error message is "Action Microsoft.Crm.Config.Client.InstallPstAction failed. LaunchOutlookInstallerProcess failed."
Use ProcessMon to see if it’s registry or file access issues. (http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx)
Active Directory DNS Issues:

The following error is shown when configuring - “The configuration wizard cannot connect to the Microsoft CRM server. This might indicate that the server is down.”
Add DNS Record for Organizations being accessed over IFD
Add DNS Records if you are using a Host Header on the CRM Website
Verify you have the correct SPN set on the Account running the AppPool. (http://support.microsoft.com/kb/929650)
Remove Duplicate SPNS http://support.microsoft.com/kb/911353
Check the Deployment Properties table:

KB 970630 (http://support.microsoft.com/kb/970630)
KB 947423 (http://support.microsoft.com/kb/947423)
Check Website for Host Header and Port that where updated post CRM Server install.
You may have an issue with MAPI . This is not as frequent, and this would be a last step.

You receive the error "Action Microsoft.Crm.Config.Client.InstallPstAction failed. LaunchOutlookInstallerProcess failed."
Run the fixmapi.exe which is located at %windir%\system32\fixmapi.exe
Login Issues

Check the URL you are using:

Can you login in from the client machine within Internet Explorer successfully?
Does the User in CRM, have a Role?
Is the user set to Administrative Mode on the user record?
If so the users set to Administrative Mode will not be able to successfully launch the Microsoft Dynamics CRM Client for Outlook.
Check Managed Passwords:

When logging in through Internet Explorer from the client machine do you Get Prompted for Credentials?
Set “Automatic Logon with current user name and password” for the zone where the CRM URL was located. In Internet Explorer click Tools-Internet Options then under Security check the custom level options for User Authentication and select “Automatic Logon with current user name and password”
Remove Stored Passwords that are located in Control Panel | User Accounts | Managed Passwords
Permissions may be causing a problem:

Permissions on Role
Turn on Platform Tracing to see if any CheckPrivilege errors occur
- CrmCheckPrivilege failed. Returned hr = -2147220960 on UserId: 8bebb2df-3ac8-dc11-8d71-005056000030 and PrivilegeId: 588725dd-c878-41c5-a4c3-5efc93cd3ffd

- If permissions are missing look in the Organization database to find out what privilege is missing.

Select * from privilegebase where PrivilegeID = ‘id of privilege GUID from the trace’
On the User Record check the Access Mode and see if it is set to Administrative Mode and if it is change it to Full
If there could be a permission issue on the Website in IIS look at IIS Logs & Plat Trace
Sync IWAM and IUSR passwords KB 906365 (http://support.microsoft.com/kb/297989)
Do you have any 3rd Party Addin’s?

Do you have the latest updates to other Addin’s?
Temporarily disable 3rd party Addin’s to find the Addin that is causing the issues.
Check the IFD Settings if it is enabled:

Setup IFD if accessing externally using the Microsoft Dynamics CRM Client for Outlook over the internet requires that IFD be enabled.
More info on IFD here (http://www.microsoft.com/downloads/details.aspx?familyid=3861E56D-B5ED-4F7F-B2FD-5A53BC71DAFC&displaylang=en)
CRM Outlook Add-in Responsiveness

Apply the latest Update Rollup for Microsoft Dynamics CRM 4.0

Disable other Outlook Add-ins to see if the issues still occur.

Start enabling the Add-ins one at a time to find out what Add-ins are causing the issues.
Check to see if there are any new updates for the Outlook Add-ins that are installed on the client machine. We have seen issues where older versions of some Outlook Add-ins have caused issues with Microsoft Dynamics CRM.
Gather a crash dump or hang dump to send into Technical Support using the ADPlus Tool at http://support.microsoft.com/kb/286350

ADPlus is a tool that will allow us to get a memory dump from a process that is giving you problems. To get this tool, please install the most current version of “Debugging Tools for Windows" from http://www.microsoft.com/whdc/devtools/debugging/default.mspx

Once these tools are installed, do the following to capture a Crash Dump or a Hang Dump:

1. Create a directory called c:\adplus

2. Open a command prompt and change to the directory where you installed the debugging tools. By default, this is c:\Program Files\Debugging Tools for Windows

3.a. Crash Dump - If Outlook crashes (restarts or the Outlook.exe process disappears), then a crash dump is required. This can be captured using the following commands and needs to be run before the Outlook crash occurs.

To capture a Crash Dump type the following:

cscript adplus.vbs -crash -pn Outlook.exe -o c:\adplus
Note: a WARNING window will pop-up regarding debugging symbols - click OK

3b. Hang Dump - If Outlook is hanging or non-responsive to mouse clicks or keyboard commands for at least a minute or more than a hang dump may be required to troubleshoot the issue and can be captured using the steps below. The hang dump is a point in time capture and must be performed after the hang has occurred. Do not perform the steps to capture a hang dump before the problem has occurred, but after the Outlook.exe process has hung.

To capture a Hang Dump type the following:

cscript adplus.vbs -hang -pn Outlook.exe -o c:\adplus
Note: A WARNING window will pop-up regarding debugging symbols - click OK
Note: It is best to take three different Hang Dumps usually 30-60 seconds apart from each other.

4. Do not interfere with the windows that are opened, just let it run minimized.

5. You will not be able to log off the system while you are monitoring.

6. After the hang/crash occurs, please zip and send the contents of the c:\adplus directory.

If help is required with these procedures, please open a support case.