Debugging a custom DataSyncService plugin

Friday, May 26, 2017
Avatar

Hello,

We're using your SDK template to build a Defect Sync plug-in for HP Quality Center.

Since it's a plugin running in a service, debugging presents some unique problems.

Any suggestions on attaching Visual Studio's debugger so I can step through from breakpoints or thrown errors?

Thanks in advance,

Will Menton

 

2 Replies
Tuesday, May 30, 2017
Avatar
re: wmenton Friday, May 26, 2017

A couple of things I've tried to no avail:

  • attaching Visual Studio to the DataSyncService (as Admin)
  • using Debugger.Break() and Debugger.Launch()

The former does nothing, and the latter causes the service to crash without launching VS

Tuesday, May 30, 2017
Avatar
re: wmenton Tuesday, May 30, 2017

Figured it out. For anyone else who comes this way with the same question:

  1. On the SpiraTeam host machine: Start VS as Admin and open the project
  2. Put Debugger.Launch(); in the constructor public DataSync()
  3. Build and deploy the debug build
  4. Do not close the project (you'll need the project already open as Administrator)
  5. Start the Service
  6. When the debug options pop up, choose the Admin session you already have running

 

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Friday, May 26, 2017
  • Last Reply: Tuesday, May 30, 2017
  • Replies: 2
  • Views: 3311