Question

I'm writing a .dll using Monodevelop on Linux that is run by an application, and I have no control over how or when my code is called, but I would like to debug that DLL.

How can I make Monodevelop's debugger attach to that DLL when a chosen method is run in the DLL ?

Alternatively, I thought about starting the debugger from the code itself (i.e. "from now on, please debug me").

The DLL I'm writing contains a xbuild task that throws and obscure exception when run using xbuild (but the code runs fine if I call it from main), so if there's any way to debug custom xbuild tasks, I'm interested in that too.

Was it helpful?

Solution

  • Open your library project options
  • On left side go to Build->Output
  • Output path: set to path where external application will load your dll
  • On left side go to Run->Custom Commands
  • In dropdown box with text (Select a project operation) change to "Execute"
  • In Command textbox set to external executable that loads your dll

Now you can right click on your library project in SoltuionPad and set "Set As Startup Project"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top