How to debug a plugin.... (1 Viewer)

egonspengleruk

Retired Team Member
  • Premium Supporter
  • June 30, 2005
    250
    0
    I have run though the plugin tutorial and have the simply plugin up and running. Next is to have a go at adapting this to my own code (looking at a plugin to download stock prices aka xStocks script in XBMC).
    How do I go about debugging this easily? Erwin's tutorial just "worked" out of the box.....are there any tips and tricks to put in breakpoints for example mid plugin?
    Also, how do I add the "OurPlugin" into the main MediaPortal build. Im currently running two different instances of Vis.NET.
     

    samuel337

    Portal Pro
    August 25, 2004
    772
    0
    Melbourne, Australia
    egonspengkleruk said:
    Also, how do I add the "OurPlugin" into the main MediaPortal build. Im currently running two different instances of Vis.NET.

    In the VS.NET instance that you have opened with the MediaPortal solution, right click on the MediaPortal solution item (the top-most item) in Solution Explorer, goto Add, then Existing Project. Select your OurPlugin project and it'll be added to the MediaPortal solution.

    Be warned though - when you update via CVS, you will have to re-add your project because the solution file will be overridden by the one on CVS.

    Sam
     
    A

    Anonymous

    Guest
    after doing what samuel337 said you just set breakpoints, make sure you build MP and your plugin in Debug mode or else it wont debug (says how in one of the CVS docs, I think you just set to debug, compile, then copy all files from the xbmc/release directory to the debug directory but DO NOT override any files if I remember correctly) another option is yopu can just run mp from regular build and under the debug menu click processes and attach to mediaportal and your breakpoints will be triggered, kinda annoying though as everytime you make a change you gotta re attach the debugger to mp
     

    Diliban

    New Member
    July 28, 2005
    4
    0
    #If DEBUG Then
    ' Start the debugger.
    Debugger.Launch()
    #End If


    Use the above piece of code to start the debugger from within the app :wink: :wink:
     

    egonspengleruk

    Retired Team Member
  • Premium Supporter
  • June 30, 2005
    250
    0
    Diliban said:
    #If DEBUG Then
    ' Start the debugger.
    Debugger.Launch()
    #End If


    Where is "Debugger" defined? Im making a plugin here...so im assuming I need to add a Using #### for it....but what do I add?
     

    Users who are viewing this thread

    Top Bottom