2

Firstly, I am a newbie on Mac programming. I have downloaded macam project and successfully compiled debug version to 32-bit code with Xcode 4.1. The output is a QuickTime component that I manually copy to Library/QuickTime folder. Now I want to debug the component but have no luck. I enable multiple breakpoints in the code and then use Product->Debug->Attach to Process to check the webcam output in Skype. Skype shows the (dummy) webcam running but my breakpoints do not work. I am sure my functions are called as they are the ones drawing color stripes as webcam output.

Apple documents on debugging a shared library are not very good. Is there something fundamental wrong with my approach or something simple I need to do first? Any guidance is much appreciated.

EmptyStack
  • 51,274
  • 23
  • 147
  • 178
superg
  • 379
  • 1
  • 6
  • 19
  • Hi, have you been able find any solution for debugging? and have you been able to obtain output from MyDummyCamera into skype? Awaiting reply, Thanks. – Abduliam Rehmanius Oct 12 '11 at 14:31

2 Answers2

2

The approach I used for debugging of my QuickTime component project was to use NSLog() in the beginning and return of every major function in the format ClassName functionName: parameters... I then used Console (Search for console in spotlight) app to view the logs. This might not be the easiest/best way but I did succeed to debug and complete my component.

Edit: this question provide some more useful information about NSLog How to print out the method name and line number and conditionally disable NSLog?

Community
  • 1
  • 1
Abduliam Rehmanius
  • 928
  • 12
  • 23
1

One of the easiest ways of debugging this, if you are going to use a third-party application like Skype, is going to be thru debug statements or a network socket.

What you can do, is create a UDP socket to send messages, as well as a client application to listen for them. This will provide you access to realtime information from your application...

You can also put in UDP listen statements to wait for (your other testing app) to send parameters.

I know this isn't the traditional way of debugging, and it can cause its own problems, but if done properly, can provide tons of useful debugging when all other tools fall short.

Marshall Anschutz
  • 1,200
  • 1
  • 12
  • 23
  • Also, one other way is just printing the debug statements to a file or the system console if you don't need the socket to interact with your debugging. – Marshall Anschutz Oct 17 '11 at 23:46
  • everybody knows about the log statements (SOCKET debugging is a good idea though), but what would be more nice is to be able to debug the code line by line as you do normally in your cocoa apps or something. Any idea? anyone? – Abduliam Rehmanius Nov 14 '11 at 00:11