Hi Mike,
Sorry, I just realized you replied to this topic...
I figured what the problem was,
If I attach VS to Jiwa.exe, it will load the class (the plugin assembly but not the class from my VS project as I said in my earlier post) under 2 conditions.
- if you have System.Diagnostics.Debugger.Break() or
- if code throws an unhandled exception
When this happens, I can set breakpoint in that class file and next time it will always stop at the same breakpoint (because assembly name is the same, unless you change plugin name).
The funny thing is, I usually only need to debug a plugin if it throws an error, so I never had to add System.Diagnostics.Debugger.Break() in my plugin code.
The plugin I needed to do was related to CreditorChqPay and Debtor Statement which I haven't yet wrote plugins for, so, I want to take a look at the object's properties before I start coding.
I couldn't figure out how to set breakpoint because I was setting breakpoint in my own project's class file.
The other thing I don't have time to prove/check is why my project breakpoints don't load when I use surrogate project. I do remember it was working (setting breakpoint in my project's class) if I launch Jiwa with surrogate project. Maybe I referenced to my own DLL inside plugin.
Anyway, for anyone who wants to debug plugin inside VS, I found it is much easier if you just use "attach to process" function in VS and have System.Diagnostics.Debugger.Break() in the plugin code.
Unless there is another easier way Mike didn't tell us

Regards,