开发者

Mac QuickTime component debugging

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 bu开发者_如何学Pythont 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.


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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜