After compiling the ITK and RTK libraries, cannot use breakpoints to enter the corresponding source code in debug mode

Hello everyone,I have a question to ask.
I compiled the FFTW library separately before compiling it with ITK. Then, the Build and install processes were completed smoothly without any errors. Then, I placed my project code into the ITK solution in order to access the RTK source code during runtime, as shown in Figure 1. However, I encountered a problem. I cannot use breakpoints to access the source code of rtkFFTProjectionsConvolutionImageFilter.hxx. I added cout to this hxx source code and recompiled it. The cout in this hxx can print to the console normally as shown in Figure 2, but I still cannot access the hxx source code as shown in Figure 3 and Figure 4. And I hope to output the image after padding, so I added some code to save the image in the source code as shown in Figure 5. However, after normal operation, the image I specified was not saved. Why is that?
The ability to print cout to the console indicates that the function in hxx is running, but why can’t the breakpoint be entered? Why doesn’t the code to save the image execute?
Thanks!
image




Maybe related to some weirdness in the build system, e.g. copying source or header files around the filesystem (such as installing them). Perhaps @simon.rit has a suggestion?

1 Like

I now see that this was cross-posted from:

No sorry, I am not familiar with MSVC. You’re might be right, it may be the wrong file.

If you hover over the breakpoint with the exclamation mark (!) then you may get more information. The problem most commonly is that the .pdb file is not up-to-date (the source code is modified and the .dll, .exe, and .pdb files are not updated; rebuild to fix). It may also happen that no symbol is found for the file at all, for example because the pdb file is not found (if you move the .exe or .dll files after build, then make sure you move the .pdb files along with them).

Thank you all for your help!
I have an other question.After compiling the ITK and RTK libraries, why can some.hxx files be reached by breakpoint in debug mode, but some others cannot? For example, in the following two images, rtkBoellaardScatterCorrectionImageFilter.hxx can be reached by breakpoint in source code in debug mode, but rtkFFTProjectionsConvolutionImageFilter.hxx cannot be reached by breakpoint in source code in debug mode.




The usual reason for a file not to be reachable is when it is not part of the executable you are trying to debug. Another reason might be that it is part of a DLL which has not been loaded yet. The third reason might be that it is CUDA/GPU code, and Visual Studio does not support it well.

Thank you for appreciate!The thrid reason helps me.

The tooltip in your screenshot explains why the breakpoint is ignored.

1 Like