Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Problem setting complex breakpoints

WSinc
New Contributor I
682 Views
Sometimes I have a breakpoint situation that is TOO COMPLEX
for the debugger, so I have to resort to (example):

Do i=1,100
do j=1,50
do k=1,20
if(I == 43 .and. J == 65 .or. k < 13)then
continue ! breakpoint HERE
endif
end do
end do
end do

Then I will put the breakpoint on the CONTINUE statement. The problem is that
the compiler optimizes the code so that there is NO EXECUTABLE code where I want to put the
breakpoint. So the little red dot gets puts somewhere else I don't want.

So, is there a way to FORCE it to put the breakpoint where I want it?

Notice that if there is NO executable code there, using the machine code does not
give any results either. I probably should TURN OFF the optimizer if there is a way to do so, for debugging purposes.

Maybe instead of a CONTINUE statement, I could say: junk=junk+1, but
that seems like a lot more trouble.

Any ideas?
0 Kudos
1 Solution
Steven_L_Intel1
Employee
682 Views
Insert a call to the Windows API routine DebugBreak at the desired point. Add USE KERNEL32 to define it. Just CALL DebugBreak.

View solution in original post

0 Kudos
2 Replies
Steven_L_Intel1
Employee
683 Views
Insert a call to the Windows API routine DebugBreak at the desired point. Add USE KERNEL32 to define it. Just CALL DebugBreak.
0 Kudos
WSinc
New Contributor I
682 Views
OK, I will try that -

Thanks ! !
0 Kudos
Reply