Debugging a custom DataSyncService plugin

Friday, May 26, 2017 7:05:06 PM

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 11:47:56 AM
Avatar
re: wmenton on Friday, May 26, 2017 7:05:06 PM

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 1:11:05 PM
Avatar
re: wmenton on 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

 

Statistics
  • Started: Friday, May 26, 2017 7:05:06 PM
  • Last Reply: Tuesday, May 30, 2017 1:11:05 PM
  • Replies: 2
  • Views: 660