Ask Your Question

Revision history [back]

I would say that pklab's answer is the right one. However, I am very lazy and dumb, but I needed to do this with the cudafilters library the other day and did it as follows. The only caveat to this is that you need the Visual studio solution created by CMake on hand.

  1. Open up your solution and make sure you're on Debug
  2. Right click your solution in the solution explorer, select Add Existing Project, and add the .vcxproj that corresponds to the OpenCV module you'd like to debug. The project should now be in your solution.
  3. If you link against the debug libraries made by OpenCV, then stepping into these functions should allow you to see the OpenCV code.

The trick is having the OpenCV module project alongside the project you're working on in the Solution explorer. Once you're done you can remove the reference to the OpenCV project and continue.

I would say that pklab's answer is the right one. However, I am very lazy and dumb, but I needed to do this with the cudafilters library the other day and did it as follows. The only caveat to this is that you need the Visual studio solution created by CMake on hand.

  1. Open up your solution of the project you're working on, and make sure you're on Debug
  2. Right click your solution in the solution explorer, select Add Existing Project, and add the .vcxproj that corresponds to the OpenCV module you'd like to debug. The project should now be in your solution.
  3. If you link against the debug libraries made by OpenCV, then stepping into these functions should allow you to see the OpenCV code.

The trick is having the OpenCV module project alongside the project you're working on in the Solution explorer. Once you're done you can remove the reference to the OpenCV project and continue.