This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Jun 12, 2017, 10:27 AM
20 Posts

Debugging Extension Managers

  • Category: Domino Server
  • Platform: Windows
  • Release: 9.0.1
  • Role: Administrator,Developer
  • Tags: Debugging Extension Manager
  • Replies: 5

Hello,

Task:  I now have a task to create an extension manager to change a behavior for when a database is created within a specific folder to change the ACLs for that database.

Right now I am setting up a development server with Domino, Notes, Notes API, Visual Studio and will first compile the example extension manager to start off with.  My question is this, how do I step through the code of an extension manager once it is coded being the server must load the compiled version on startup.  With executables I can just start the debugger any time I want to run the executable.  I remember being able to do this before with the last extension manager I did about 4 years ago and it is probably something more simple than I am thinking but figured while I am loading up my environment maybe I could get some good pointers here that will make this little project easier from those of you who are more experienced in this and do this on a daily basis.

Any help or pointers would be greatly appreciated.  For now just concentrating on the example I remember from the C API so this is what I will practice compiling and debugging with first to re-familiarize myself.

This will be done on a single Windows 2012 Server with everything needed to be installed so remote debugging will not be necessary.

Thank you,

Larry

Jun 13, 2017, 9:12 PM
323 Posts
I haven't done this in a while, but I think it'll still work.

When I did this last, I think I still ran the Domino server in debug, but only specified breakpoints directly in the extension.

Jun 14, 2017, 4:51 AM
7 Posts
Attaching to a running process

It was quite a few years ago, and definitely an older version of Visual Studio than what's mentioned here, but I was able to run the server as normal and then attach the debugger to the server's running process using a procedure similar to this: https://msdn.microsoft.com/en-us/library/3s68z0b3.aspx

 

-rich

 

Jun 14, 2017, 1:13 PM
20 Posts
thank you

Thank you Rich and Mike.  It has been a while but it seemed like I was able to do it before in a simple way like maybe using breakpoints.  I got stuck on some other stuff so just now getting back to this.  I will respond back to this thread once I do this with what worked for me.  Sounds like both methods will work so I will try each.

Jun 19, 2017, 10:02 PM
20 Posts
I cannot get this to work

I could not get any of the samples working to where I could step through the code for debugging purposes.

But I did find an old project of mine.  It did not seem like it was doing anything but then I added some printf lines to it to see when it is loading and when the event is triggered.  So I do have this extension manager loading now but I am having an issue with it logically for what it was originally designed for.  So I am working on changing that.

If the dll and pdb file is in the Domino directory and you have a break point in the code you can attach to nserver and when it hits that breakpoint it will stop there and allow you to step through.

When I am done getting everything working like I want I will come back and create a webex recorded video how to take simple sample I have, put in projects folder, how to configure project settings, compile to DLL, and then how to step through the code to see it working.  When done I add to youtube and then add link here.  Hopefully it will save someone time in the future.

Jun 21, 2017, 12:36 PM
20 Posts
status

I got the previous project to work in visual studio.  It would compile and I could attach to it and step through the code.  I then tried creating a new win32 console DLL project, set all the configuration settings properly for x64 compilation, got it to compile, and then this new dll when added to Domino notes.ini would cause Domino to crash.  I went through all the compiler and linker settings to match like the other project but it would still crash.  So I then went on to just change the code in my older project to do what I wanted.  I got this complete and so my project I can call as done.  But still not happy why on a new project with same settings it would cause Domino server to crash on load.

When some more time allows I will look into this more by reviewing and comparing all the project files.  Something must be different somewhere.  Once I am happy that I can do this from start to finish then I will create a new video showing all the steps from start to finish.  Then post link to here and mark as resolved.  If anyone has bumped into this issue and has any additional pointers I would appreciate it but I am sure with enough time I will figure it out.

I am creating 64BIT extension manager using Visual Studio 2010 and compiling for Domino 9.0.1 64bit Server.

Thank you


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal