- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
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?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Insert a call to the Windows API routine DebugBreak at the desired point. Add USE KERNEL32 to define it. Just CALL DebugBreak.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Insert a call to the Windows API routine DebugBreak at the desired point. Add USE KERNEL32 to define it. Just CALL DebugBreak.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, I will try that -
Thanks ! !
Thanks ! !

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page