Is it possible to debug plugin without having source code for MP? (1 Viewer)

artisticcheese

Portal Pro
February 1, 2007
80
0
Hi,

I have VS 2008 and would like to know if it's possible to debug my plugin without checking out MP source code and adding it to my solution? Can I just use MP binaries and debug my plugin directly?
 

LRFalk01

Portal Pro
August 27, 2007
257
92
39
Home Country
United States of America United States of America
I'm not sure what kind of debugging you are talking about, but i just write my debugging information directly to a file via StreamWriter in System.IO.
 

artisticcheese

Portal Pro
February 1, 2007
80
0
I meant debug my plugin within VS 2008. My plugin is Class library and needs external executable to reference it to break in but if I specify mediaportal.exe as executable then it fails telling me that mediaportal.exe does not contain main method
 

solis66

MP Donator
  • Premium Supporter
  • January 22, 2007
    141
    20
    Home Country
    Sweden Sweden
    I'm not sure about VS 2008, but in VS 2005 it is possible.

    1. Copy your plugin (debug version) to correct plugins folder (process/windows, where you installed MP).
    2. Open your plugin in VS, and set some breakpoints...
    3. Start your installed MP.
    4. Choose "Debug/Attach to process" in menu, and pick MediaPortal.exe

    Now you should be able to debug your plugin with the original installed MP binaries.
    The drawback is that it can be hard to debug startup process, since you cant debug before you've attached to MediaPortal.exe but otherwise it works fine.

    Good luck
     

    Inker

    Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    You can just
    a) configure a post-build event to copy you're dll into the correct directory of MP (wherever it is installed)
    b) configure mediaportal.exe or configuration.exe as the StartProgram (or create to build configs, one for each)

    Then you can just hit F5, which will compile, copy required files and launch MP so you can debug just fine (VS automatically connects to the correct process).
     

    Users who are viewing this thread

    Top Bottom