It's hard to debug Dll's .
So I am using 3.0.4 generated files which works.
I will report it when I find the problem otherwise I am not clogging up the place half baked thories and hacks.
At least on Windows, it should work (using gdb based debugger). The only part that can be problematic is catching exceptions/raise.
Make sure to compile the dll with debug info.
Specify your "host application" under "run parameters". Make sure the host app can see the dll (i.e. dll is in same folder).
Catching raise/except in the DLL, should work if you strip the host app of all symbols.
With Lazarus trunk it may also work (not tested) if you set the debug option "InternalExceptionBreakSetMethod" to "ibmName".
Breakpoints in the dll should work (they should have a pause symbol, until the dll is loaded. Then they should show the normal symbol. (On older gdb (7.x?), the pause symbol remains)