x


How would I debug a Unity-plugin from XCode?

What are the proper settings in XCode to debug a Unity Objective C/C++ plugin? I would like to know exactly what project settings are needed and how I should hook up XCode with Unity in order to start debugging.

more ▼

asked Oct 21 '09 at 09:00 PM

Jens Fursund gravatar image

Jens Fursund
381 3 4 11

It would be great to get instructions for this for XCode4 and Unity 3.5

Feb 18 '12 at 12:41 AM DaveA
(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

I haven't tried this for Unity C++ plugins, but this is normally how you debug dynamic libraries in XCode (works with our web plugin):

Build a debug version of your plugin. Then either: -Run Unity, in XCode "Run" menu choose "Attach to Process" to attach to Unity -Or choose "Project"->"New Custom Executable", Choose Unity.app, set the working directory to Unity, and then run that executable from XCode.

more ▼

answered Nov 16 '09 at 07:57 PM

jonas echterhoff gravatar image

jonas echterhoff ♦♦
9.7k 7 23 102

can you update this with current XCode commands? there is no longer a 'project' menu

Feb 18 '12 at 12:05 AM DaveA
(comments are locked)
10|3000 characters needed characters left

I just managed to debug the bonjour client sample. Until now message "Previous frame inner to this frame (gdb could not unwind past this frame)" shows up on every break point hit, but it works so far. Although I use debug settings and GCC 4.2 as proposed in related question on stack overflow, I get these warnings. I guess there is some Unity code compiled using LLVM, but can live with that.

more ▼

answered Jan 26 '11 at 11:05 PM

Kay gravatar image

Kay
1 3

Can you be more specific? Which version of Unity, which version of XCode did you use? How did you manage to get it running an set breakpoints?

Feb 18 '12 at 12:04 AM DaveA
(comments are locked)
10|3000 characters needed characters left

gdb cannot be used to debug a plugin to my knowledge you should just do things like printing stuff to screen and what not to debug it.

more ▼

answered Oct 31 '09 at 07:19 PM

bloodtiger10 gravatar image

bloodtiger10
64 1 2

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1999
x392
x347
x239

asked: Oct 21 '09 at 09:00 PM

Seen: 3225 times

Last Updated: Feb 18 '12 at 12:41 AM