- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
What was the name of the Windows API function that allowed setting a user breakpoint at program runtime? I have a app that runs very fast and want to debug the running app but i do not want to start it from the debugger since im investigating an error that does not occur when starting the app from the debugger.
Regards,
Ingo
What was the name of the Windows API function that allowed setting a user breakpoint at program runtime? I have a app that runs very fast and want to debug the running app but i do not want to start it from the debugger since im investigating an error that does not occur when starting the app from the debugger.
Regards,
Ingo
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DebugBreak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there already a module that enables DebugBreak for fortran or do I have to write my own interface? If so, can you give me an example how?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
USE KERNEL32
When you look up a Win32 API routine in the MSDN documentation, click the "check" on the page to see more information. It will list the library the routine is found in, such as "kernel32.lib". That's your clue as to the module name to use.
Here's a little program I wrote yesterday to test this API (and IsDebuggerPresent, which tells you if the program is running under the debugger).
When you look up a Win32 API routine in the MSDN documentation, click the "check" on the page to see more information. It will list the library the routine is found in, such as "kernel32.lib". That's your clue as to the module name to use.
Here's a little program I wrote yesterday to test this API (and IsDebuggerPresent, which tells you if the program is running under the debugger).
program Console3
implicit none
integer i
do i=1,10
call sub (i)
end do
end program Console3
subroutine sub (i)
use kernel32
integer i, ret
if (i == 5) then
if (IsDebuggerPresent() /= 0) then
Call DebugBreak
else
write (*,*) "Not in debugger"
end if
end if
return
end subroutine sub
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much, this is all I need.
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