Is there any way to debug a trigger? RRS feed

  • Question

  • Is there any way to debug, or at least write to a log while I am developing a trigger? I couldn't find a way to investigate what goes wrong with my trigger. It just does nothing -- I am not even sure if it's executed at all.


    Tuesday, March 24, 2015 3:39 PM


  • There isn't a good way to debug within stored procedures. This is something we'd like to add in for a future update. 

    One potential issue you might be running into is that triggers must be "opted-in" in DocumentDB unlike relational databases. Take a look at https://code.msdn.microsoft.com/windowsazure/Azure-DocumentDB-NET-Code-6b3da8af/sourcecode?fileId=134860&pathId=414940074 for an example.

    If you're unable to identify the root cause, please include your endpoint and an activity ID of a request with this issue and we'll take a look at our service logs.

    Tuesday, March 24, 2015 6:13 PM