Native Desktop Plugin - XCode4/VS attach to process?

Has anyone been able to attach XCode4 to the Unity process to debug their native plugin code (desktop)?

If so, any advice on settings to set or chants to perform?

I’ve tried with no luck as of yet (on XCode4, haven’t booted to Windows for VS yet)… perhaps this a problem with the DRM?

Quick follow up… it appears Unity’s DRM is blocking attaches to process, however, can debug a standalone player… so possible!

But it makes little sense to debug it as only the parts running close to .NET (and only in dev build) will appear in the debugging, you have no debug symbols to debug the rest.
If you hit a crash you can with some luck extract a deep path in the callstacks that tells you what went wrong (as in the crash of terrain + movie caused by the PerlinNoise class called by the terrain foliage wind functionality even on terrains with no foliage at all) but generally its of rather little use.

On windows, if I recall right, it gives you even less informations

@dreamora: Not sure what you mean… can debug native C++ plugin with callstacks and variable browsing just fine.

Yeah your own code you can, but when they are hooked against unity there are various things you can’t debug as errors in the native plugins can easily take down the whole mono environment your application is using your run unhappily. (especially if your native code uses threads and callbacks and you forget that you must never call into UnityEngine.Object extends)

Problem with debugging it this way is that native code can’t debug the stuff written inside your game in C# / JS / boo and MD can’t debug the native code … it can become extremely straining