[solved] Using SetupTv while debugging TvService (1 Viewer)

myscha

Portal Pro
May 6, 2008
71
15
Home Country
Germany Germany
Hi folks,

I'd like to write a plugin for the TvServer and be able to debug it. I'm using the latest stable SharpDevelop and I'm able to compile the TvService and run a debug session. But when I'm starting SetupTv, it tells me that TvService is not running and asks whether it should be started. If I confirm with 'Yes' it takes some time until the setup screen comes up but throws messages (TvService not running) as soon as I select anything from the list. In the task manager I can see that TvService is running as a process while the debug session is active.

How can I tell SetupTv that it should 'connect' to the TvService running as process?

Best regards,
Michael
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello Michael

    Off the top of my head, I think you'll find that SetupTv is checking whether the TV service is running by checking if the Windows service "TVService" is running. Normally that service looks for the TvService.exe in your TV Server install folder... but if you're debugging, you're probably running a TvService.exe from a build bin\Release or bin\Debug folder, and therefore the Windows service is not actually running. In other words its a case of different TvService exes that I think is causing the problem.

    For myself I never run the service or configuration out of build folders. I have scripts that clean and then copy the required files to my install directories. In other words, I do a sort of install/upgrade. To debug I insert a call to System.Diagnostics.Debugger.Launch(); which allows me to attach VS to the running process at the point I'm interested in... or I can use the general VS attach to process debug menu option to debug the service in its current state.

    Hope that helps...
    mm
     

    myscha

    Portal Pro
    May 6, 2008
    71
    15
    Home Country
    Germany Germany
    Thanks for this clearance.

    I didn't like to stop the TvService manually for replacing the plugin dll, but meanwhile I made a batch script that stops it automatically before building. And, inspired from your description ;), I made a second script that copies the required files to the install directory.
     

    Users who are viewing this thread

    Top Bottom