Turning on debug defaults to -Od, this is only a matter of the default /O2 being changed to /Od. If you specify your optimization level, the compiler will observe it. You would either build in a release configuration with /Zi added, or in a debug configuration with -O2/O3 etc added, so as to generate .pdb and profile the optimized code. Due to the optimization, the code source view will not always associate samples with the exact source line, but it usually shows close to the location responsible for the operations.
tim - thanks for the quick reply. However, just to be sure:
The Intel fortran help says:
============ General > Debug Information Format
This option enables or disables generation of debugging information. It is passed to the linker.
Note that if you turn debugging on, optimization is turned off.
If conflicting keywords are used in combination, the last one specified on the command line has precedence. ============ this seems to state that optimization (rather than 'default' optimization) is turned off when debug=full, etc