web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM Plugins - Error Line Number

(0) ShareShare
ReportReport
Posted on by

Hi,

When an error occurs in a CRM Plugin, is it possible to know what the error line number is? If not, is there an alternative?


We just released a big plugin re-write and are seeing the "object reference not set to an instance" error. We would like to know on which line it happened.

Thank you!

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi Anatoliy,

    there should be a Stacktrace?

    You could also use the Plugin Profiler to Debug your code in Visual Studio.

    best regards

    Niklas

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Don't think there is anyway to show line number.

    As you are using CRM On-Premise, you can attach you plugin code to w3wp process on the CRM Machine (install remote debugger on that machine), and try and debug the plugin code using Visual Studio.

    Hope this helps.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Anatoliy,

    it is not possibile.

    I suggest to implement a log system which will help you to identify the exact point where exception is thrown.

    Hope it helps!

    If you found the answer helpful, please mark as Verified

    Join my network on LinkedIn Follow me on Twitter

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Suggested answer
    Sid07 Profile Picture
    285 on at

    Hi,

    You can using the Itracingservice to trace in the plugins.. Also in the exception you may try using StackTrace that might do. Also the error usually comes when an object u using is null n ur trying to get the value from that null. May just have glance throughout it code... N may find out that issue..

    Hope this helps.

  • Community Member Profile Picture
    on at

    Thank you all for the responses! I will use the ITracingService when we upgrade to CRM 2015 or higher.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans