Windows Online Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Monday, 7 June 2010

Debugging a Plug-in

Posted on 22:11 by Unknown
The following steps describe how to debug a plug-in.

1. Deploy the plug-in assembly.
Copy the assembly to the standard plug-in folder on the server: \Server\bin\assembly. If there is another copy of the assembly at the same location and you cannot overwrite that copy because it is locked by Microsoft Dynamics CRM, run the iisreset program in a command window to free the assembly.

2. Register the plug-in on the desired stage of the event execution pipeline. Register the plug-in assembly on the server using on-disk deployment.
Tip It is possible to debug a database deployed plug-in. The compiled plug-in assembly's .pdb file must be copied to the server's \Server\bin\assembly folder and IIS must then be restarted. After debugging has been completed, you must remove the .pdb file and reset IIS to prevent the w3wp.exe process from consuming additional memory.

Generally, you do not want to register your plug-in in the event execution pipeline until the plug-in assembly is available on the Microsoft Dynamics CRM server. If someone else is using Microsoft Dynamics CRM on the server, and you have registered the plug-in in but have not yet deployed the assembly, the person running Microsoft Dynamics CRM receives an error if the system tries to execute the missing plug-in.

3. Configure the debugger.
Set a breakpoint in your plug-in code. For an online plug-in, attach the debugger to the w3wp.exe process on the Microsoft Dynamics CRM server. For an offline plug-in, attach the debugger to the Microsoft.Crm.Application.Hoster.exe process. For asynchronous registered plug-ins (or workflow assemblies) attach to the CrmAsyncService.exe process. If there are multiple processes running for the same executable file, attach the debugger to all of them because you do not know which process runs your custom code.

4. Test the plug-in.
Run the Microsoft Dynamics CRM Web application, or other custom application that uses the SDK, and perform whatever action is required to cause the plug-in to execute. For example, if a plug-in is registered for an account creation event, create a new account.

5. Debug your plug-in code.
Make any needed changes to your code so that it performs as you want. If the code is changed, compile the code into an assembly and repeat step numbers 1, 3, and 4 in this procedure as necessary. However, if you change the plug-in assembly version number, you must unregister the earlier version of the assembly and register the new version.

6. Register the plug-in in the database.
After the edit/compile/deploy/test/debug cycle for your plug-in has been completed, unregister the (on-disk) plug-in assembly and then reregister the plug-in in the Microsoft Dynamics CRM database.
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in Debug | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • MS CRM 2011 Beta - Product Keys
    Here are the Product Keys for MS CRM 2011 Beta. The following product keys are available for this release: •Microsoft Dynamics CRM Workgroup...
  • Callout vs. Workflow
    You might find yourself wondering when you should use a pre- or post-callout versus when you should use a workflow rule. As you would expect...
  • Microsoft Dynamics CRM 2011 Release Candidate (RC) Announcement
    The Microsoft Dynamics CRM 2011 Release Candidate (RC) is now available for download from the Microsoft Download Center.  As with the Micros...
  • Declare Global Access Level functions in MS CRM Form.
    Global functions in MS CRM Form. The way CRM adds the javascript to the page, any function defined in the onload event will only have a loca...
  • How to remove the background color of XP Desktop Icon (in Wodows XP)
    In case you are wondering why your Windows XP Desktop Icons have a background, here is a quick guide to restore your transparent background ...
  • Say Hello to the World of Dynamics CRM 2011 Beta version
    Today, the Microsoft Dynamics CRM team has reached a key milestone as it releases the beta of Microsoft Dynamics CRM 2011, for both cloud-ba...
  • Install MS CRM 2011 Beta on Windows 2008 SP2 or Windows 2008 R2?
    I think everybody is consfuse when choosing the Operating System. So here are the facts: 1. You can choose either Windows 2008 SP2 or Window...
  • "Virtual Memory Low"
    “Your system is low on virtual memory” error message when you try to start an application.... Solution : Windows XP 1. Click Start , right-c...
  • Remove / Detach Email from Queue
    DetachFromQueueEmail Message Detaches the e-mail from the specified queue. // Use below code. // Rreplace the WebService URL service.Url = s...
  • Windows Washer v4.5 (Full) (for Windows XP only)
    Download

Categories

  • .NET
  • .NET String Methods
  • Adapters
  • Aggregate Functions
  • All Elements
  • Associated Records
  • Azure
  • BizTalk Adapter
  • Callouts
  • Child Pipeline
  • Crm 2011
  • Crm 2011 Beta
  • Crm 2011 Beta - Ribbons
  • Crm 2011 Beta Installation
  • CRM Online 2011
  • Customizations
  • Database
  • Debug
  • Deployment Service
  • Dynamic Entity
  • Email
  • FetchXml
  • FileSync
  • Form Assistant
  • Hide Button
  • IIS
  • Integration
  • Internet Connectivity
  • ISV
  • Java Script
  • Lead Capture
  • MS CRM
  • MS CRM 2011 RC
  • MS CRM 4 Roll Ups
  • MS CRM 5 Features
  • MS CRM Accelerators
  • MS CRM Entity Schema
  • MS CRM Global Variable and Functions
  • MS CRM Templates
  • Pivot Tables
  • Plugin Constructor
  • Plugins
  • Reports
  • s
  • Save Record
  • SDK
  • Sharepoint
  • Sharepoint 2010
  • Sharing Data Between Plug-ins
  • Social Networking
  • SSRS
  • Tabs
  • Tracing
  • Videos
  • Visual Studio 6
  • VPC
  • WampServer
  • Windows Service
  • Windows XP
  • Workflows
  • xRM

Blog Archive

  • ►  2013 (4)
    • ►  September (4)
  • ►  2012 (8)
    • ►  September (1)
    • ►  July (7)
  • ►  2011 (12)
    • ►  July (1)
    • ►  March (1)
    • ►  February (2)
    • ►  January (8)
  • ▼  2010 (27)
    • ►  December (1)
    • ►  October (3)
    • ►  September (10)
    • ►  August (2)
    • ►  July (5)
    • ▼  June (5)
      • MS CRM Rollup 11 Known Issue (ISV config)
      • Passing / Sharing Data Between Plug-ins
      • Writing the Plug-in Constructor
      • Debugging a Plug-in
      • Create a CrmService proxy for plug-ins that execut...
    • ►  February (1)
  • ►  2009 (41)
    • ►  December (1)
    • ►  November (5)
    • ►  August (3)
    • ►  July (2)
    • ►  June (3)
    • ►  May (9)
    • ►  April (2)
    • ►  March (5)
    • ►  February (7)
    • ►  January (4)
  • ►  2008 (33)
    • ►  December (7)
    • ►  November (3)
    • ►  October (1)
    • ►  September (7)
    • ►  August (4)
    • ►  July (1)
    • ►  February (4)
    • ►  January (6)
  • ►  2007 (11)
    • ►  October (3)
    • ►  September (1)
    • ►  August (3)
    • ►  July (4)
Powered by Blogger.

About Me

Unknown
View my complete profile