It depends on what portion of the task you're attempting to debug. If you're looking to debug the task setup in the Administration Tool, all you need to do is attach to the conisioadmin.exe process.
To debug an executing task, it gets a little trickier. Load up your add-in as usual and select your machine to be the only machine that will execute the task. (In the task setup.) Close the administration tool. You'll need to create a symlink from the file in the plugins directory to your debug dll. I personally use DirLinker. The plugins directory is located at AppData\Local\SolidWorks\SolidWorks Enterprise PDM\Plugins\VaultName.
In your sourcecode, place a messagebox.show in the OnCmd method and place a breakpoint at that line. Once the task loads up, the task will wait for the messagebox to be closed. When the messagebox is shown, you can attach to TaskExecutor.exe and then you'll be able to debug. If you're not hitting breakpoints, make sure you have the correct .NET framework version selected when debugging.
If you're still not hitting breakpoints, EPDM probably loaded another instance of your dll into the plugins directory.
That's the gist of it. Let me know if you have any questions.
Thanks Lee, this is a great synopsis of what has to be done. Had to sort of muscle my way through it.
All came together after I found this routine in the Sample Add-In and read a little further...
private void PauseToAttachProcess(string callbackType)
//If the debugger isn't already attached to a
// Use a MsgBox dialog to pause execution and allow the user time to attach it...
MessageBox.Show("Attach debugger to process \"" + Process.GetCurrentProcess().ProcessName + "\" for callback \"" + callbackType + "\" before clicking OK.");
catch (Exception ex)