SimpleDALPlugin icon indicating copy to clipboard operation
SimpleDALPlugin copied to clipboard

How To Debug The Plugin?

Open bunnyirsa opened this issue 3 years ago • 4 comments

I ran the example successfully, but I don't know how to debug the plugin?

bunnyirsa avatar Sep 03 '20 08:09 bunnyirsa

As I wrote in the readme, you can use https://github.com/lvsti/Cameo (or other webcam-using apps that can be run from Xcode) for debugging. The plugin runs in the same process, thus you can debug the plugin in the same way as you debug Cameo.

  • Copy a debug build of the plugin into /Library/CoreMediaIO/Plug-Ins/DAL
  • Open Cameo in Xcode
  • Open the plugin sources you want to debug in the same window
  • Add some breakpoints
  • Launch Cameo from the Xcode window

seanchas116 avatar Sep 03 '20 09:09 seanchas116

@seanchas116 What do you mean by "Open the plugin sources you want to debug in the same window". I got the Cameo running but how will it hit the breakpoints in SimpleDALPlugin project? Can you please simplify the steps? I tried attaching the to process id of Cameo but that did not work. Thanks!

Raj123456788 avatar Sep 11 '20 18:09 Raj123456788

Got the answer: Just add the project to the cameo project. Breakpoints will hit.

Raj123456788 avatar Sep 11 '20 19:09 Raj123456788

Can somebody explain more in detail? How to run Cameo (in a debug mode) from xcode -- I cannot make breakpoints hit. Do I need to copy the debug build of the DAL plugin every time? Can we do it automatically in two xcode projects? How can I debug the plugin by building directly from xcode and run it (without the copy step)?

wookayin avatar Oct 19 '20 21:10 wookayin