简体   繁体   中英

How to step into OpenCV source code in Visual Studio 2019

I've already installed OpenCV 4.2.0 on my computer, following the guidance on its official website . Then I configured it in my Visual Studio 2019, also following the guidance on its offical website .I created a sample using OpenCV's function imread . It can run correctly.

The question is how I can jump into its source code rather than .hpp file, by hit ctrl + mouseleft on this function?

Another question is when I debug this project, I set breakpoint in the line where function imread located, and I press F11 to single step.It cannot step into where the function imread defines. I want to learn how the function works.

I have tried in Tools-> Options -> Debug -> Symbol check Microsoft Symbol Server, but it can only make my code unable to run.(maybe because my internet takes long time to connect to Microsoft Server).And in the same dialog I add opencv_world420d.pdb or change the directory of symbol cache.It cannot work for me.

I also have tried to copy .pdb files or other stuff. Please tell me how to do.Thanks

You shouldn't really need to step into 3rd party libraries code when debugging your code.

The easiest way to see what you want is to check the github repo with the source code.

https://github.com/opencv/opencv

Find the source file you're looking for, and look at the function you want to see.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM