After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 573731 - MonoDevelop debugging support
MonoDevelop debugging support
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: general
git master
Other Linux
: Normal enhancement
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-02 09:59 UTC by Alexander Kojevnikov
Modified: 2010-02-13 22:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow debugging from MonoDevelop (55.95 KB, patch)
2010-02-13 12:41 UTC, Bertrand Lorentz
committed Details | Review

Description Alexander Kojevnikov 2009-03-02 09:59:05 UTC
MD 1.9.2 (AKA 2.0 beta 1) can debug mono projects, it would be great if Banshee could take advantage of this. Currently the breakpoints don't work when selecting Run/Debug (or hitting F5).
Comment 1 Andrés G. Aragoneses (IRC: knocte) 2009-12-18 02:39:37 UTC
I wonder if the patch in bug 597950 fixes this issue.
Comment 2 Mohamed Bana 2009-12-19 23:43:34 UTC
please confirm.
Comment 3 Bertrand Lorentz 2010-02-09 19:36:48 UTC
I have been able to make some progress on this. It's available in a branch of my git clone on gitorious :
http://gitorious.org/~bl8/banshee/bl8-clone/commits/monodevelop-debug

I'm currently able to debug Banshee using mono 2.4.2.3 and MonoDevelop 2.2.1, but it hangs during startup, when loading webkit.
I'd like to know if anyone has the same problem with other versions.

By the way, some changes in the patch from bug 597950 do help for debugging, but there are other changes in the .csproj files needed.
Comment 4 Andrés G. Aragoneses (IRC: knocte) 2010-02-09 19:41:57 UTC
Bertrand, that's good news.

I wonder if the hang is a bug of the debugger, because with the last versions I've been getting lately an exception at startup when trying to load webkit, but the exception doesn't prevent me to run Banshee in the end. The stacktrace:

[Debug 13:47:52.593] Adding context page wikipedia

System.TypeInitializationException: An exception was thrown by the type initializer for WebKit.WebView ---> System.DllNotFoundException: webkit-1.0.so.1
  at (wrapper managed-to-native) WebKit.WebHistoryItem:webkit_web_history_item_get_type ()
  at WebKit.WebHistoryItem.get_GType () [0x00000] in <filename unknown>:0 
  at GtkSharp.WebkitSharp.ObjectManager.Initialize () [0x00000] in <filename unknown>:0 
  at WebKit.WebView..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Banshee.Wikipedia.WikipediaView..ctor () [0x00016] in /home/knocte/Documentos/banshee/src/Extensions/Banshee.Wikipedia/Banshee.Wikipedia/WikipediaView.cs:54 
  at Banshee.Wikipedia.ContextPage.get_Widget () [0x0000b] in /home/knocte/Documentos/banshee/src/Extensions/Banshee.Wikipedia/Banshee.Wikipedia/ContextPage.cs:59 
  at Banshee.ContextPane.ContextPane.AddPage (Banshee.ContextPane.BaseContextPage page) [0x00038] in /home/knocte/Documentos/banshee/src/Core/Banshee.ThickClient/Banshee.ContextPane/ContextPane.cs:244 
  at Banshee.ContextPane.ContextPageManager.OnExtensionChanged (System.Object o, Mono.Addins.ExtensionNodeEventArgs args) [0x00023] in /home/knocte/Documentos/banshee/src/Core/Banshee.ThickClient/Banshee.ContextPane/ContextPageManager.cs:54 
  at Mono.Addins.ExtensionNode.add_ExtensionNodeChanged (Mono.Addins.ExtensionNodeEventHandler value) [0x00034] in /usr/src/packages/BUILD/mono-addins-0.4/Mono.Addins/Mono.Addins/ExtensionNode.cs:110 

I guess it will go away if disabling the Wikipedia extension.
Comment 5 Bertrand Lorentz 2010-02-09 21:02:16 UTC
Andrés,

I think your problem happens because your webkit-sharp.dll.config points to the wrong webkit-1.0.so file. See this commit :
http://anonsvn.mono-project.com/viewvc?view=revision&revision=144155

So I don't think it's directly related to the debug problem.
Comment 6 Alexander Kojevnikov 2010-02-09 23:12:56 UTC
Just tried your branch and debugging works! I could stop at breakpoints and step in/over.

By the way, when debugging Banshee doesn't pick up the BANSHEE_DEV_OPTIONS environment variable.
Comment 7 Alexander Kojevnikov 2010-02-09 23:50:32 UTC
(In reply to comment #6)
> By the way, when debugging Banshee doesn't pick up the BANSHEE_DEV_OPTIONS
> environment variable.

After chatting with Bertrand on IRC, it appears to be the limitation of MD which doesn't expand the $(VAR) macros. Hardcoding it in Nereid project options (Run -> General) works.

Relevant MD bug: https://bugzilla.novell.com/show_bug.cgi?id=404157
Comment 8 Mohamed Bana 2010-02-10 16:28:33 UTC
The sooner this gets into trunk the easier it'll be for people to
contribute.

Can someone please update this bug or create a blog entry for how exactly I'd setup MD to be able to debug Banshee.

Keep up the good work.
Comment 9 Bertrand Lorentz 2010-02-13 12:41:09 UTC
Created attachment 153707 [details] [review]
Allow debugging from MonoDevelop

This patch contains the changes from my monodevelop-debug gitorious branch, against the latest master.

The problem of not picking up the value of BANSHEE_DEV_OPTIONS is still there, but I think the gain of debugging outweighs this annoyance. So I'd be willing to commit this if people have no objections.
Comment 10 Gabriel Burt 2010-02-13 20:43:02 UTC
Looks good to me :)  Thanks, Bertrand!
Comment 11 Bertrand Lorentz 2010-02-13 22:52:28 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.