MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Community Skins and Plugins » Plugins


Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here.

Reply
 
Thread Tools Display Modes
Old 2005-07-04, 14:24   #1 (permalink)
Retired Team Member
 
Join Date: Jun 2005
Posts: 250
Thanks: 0
Thanked 0 Times in 0 Posts


Send a message via Yahoo to egonspengleruk
Default How to debug a plugin....

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.
egonspengleruk is offline   Reply With Quote
Old 2005-07-04, 16:34   #2 (permalink)
Portal Member
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 773
Thanks: 0
Thanked 0 Times in 0 Posts


Default Re: How to debug a plugin....

Quote:
Originally Posted by egonspengkleruk
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
samuel337 is offline   Reply With Quote
Old 2005-07-05, 23:27   #3 (permalink)
Retired Team Member
 
Join Date: Jun 2005
Posts: 250
Thanks: 0
Thanked 0 Times in 0 Posts


Send a message via Yahoo to egonspengleruk
Default

Cheers for that

Now how do I debug the plugin?
egonspengleruk is offline   Reply With Quote
Old 2005-07-09, 20:15   #4 (permalink)
Anonymous
Guest
 
Posts: n/a


Default

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
  Reply With Quote
Old 2005-07-28, 03:43   #5 (permalink)
Portal User
 
Join Date: Jul 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts


Default

#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:
Diliban is offline   Reply With Quote
Old 2005-07-31, 19:09   #6 (permalink)
Retired Team Member
 
Join Date: Jun 2005
Posts: 250
Thanks: 0
Thanked 0 Times in 0 Posts


Send a message via Yahoo to egonspengleruk
Default

[quote="Diliban"]#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?
egonspengleruk is offline   Reply With Quote
Old 2005-08-01, 09:18   #7 (permalink)
Portal Member
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 773
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Nothing like googling MSDN.

Its at System.Diagnostics.Debugger, and its in the core library so you don't need to add references.

For more info, see:
http://msdn.microsoft.com/library/de...mberstopic.asp

Sam
samuel337 is offline   Reply With Quote
Reply

Bookmarks

Tags
debug, plugin

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
IPTV@UT Plugin moiristo Plugins 116 2008-10-06 22:32
MP & XBMC intergration scripts v0.6d Update 4-MAR-07 thechad Plugins 179 2008-03-18 04:47
watch stream using VLC ? chenks Get Support 12 2006-12-31 13:21
Gathering topical infos about plugins (To: authors & use tomtom21000 Plugins 2 2006-02-05 00:20


All times are GMT +1. The time now is 09:51.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden