This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 90120 - "pause" (on Windows) does not work
Summary: "pause" (on Windows) does not work
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: _ gordonp
Depends on:
Blocks: 90222
  Show dependency tree
Reported: 2006-11-28 00:40 UTC by julieg
Modified: 2009-06-25 10:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description julieg 2006-11-28 00:40:46 UTC
Given the source below, the pause button does not work, and as a result,
the "Finish Debugger Session" does not work as well.

The process has to be killed from the task manager.

Source code provided by Nik:

int main(int argc, char**argv) {
   int i;
      // Prints arguments
   for (i = 0; i < argc; i++) {
       printf("%i: %s\n", i, argv[i]);
   for (i=1; i>0; i);
   return 0;
Comment 1 julieg 2006-11-28 23:49:10 UTC
The description should say:
"pause or pause followed by finish debugging" does not work
from the source code provided.

In order to verify that the process is not terminated, please
check the performance tab in the task manager.  You will find
out that the process is running with 100% cpu cycle after
"pause button or pause followed by finish debugging" is pushed.
Comment 2 _ gordonp 2007-07-19 00:26:21 UTC
Defer until next release (possibly longer because this may require gdb fixes).
Comment 3 Alexander Pepin 2007-09-22 17:50:14 UTC
Now the debugger toolbar switches to pause state and debug session can be terminated but it looks that the process is
not stopped in fact (no cursor, no LV). I use following code:
int main(int argc, char** argv) {
    int a = 0;
    while(a == 0){
        int b = a;
    return (EXIT_SUCCESS);

 If a user set a breakpoint inside the endless loop it behaves the same way as pause.  After continuing debuggers stops
at the newly created breakpoint.  
Comment 4 _ gordonp 2007-09-29 22:33:37 UTC
Fixed with the following caveats.

1. If Cygwin's gdb is being used and the program is in a tight loop like Nik's and
   Alexander's examples in this issue, then it takes 20-30 seconds before gdb responds.
   If MinGW's gdb is being used the the program stops immediately. I tested this on the
   latest Eclipse+CDT and it had a timeout and couldn't stop Alexander's test program at
   all (I only tried twice, not an exhaustive test). 

2. When stopping on Windows, you very seldom get a stack trace which includes any user
   code. This is a Windows issue and I'm asking the gdb and Cygwin communities if there
   is any way of reaching a valid stack. At first I thought it might just be the trace
   of a different thread, but thats not the case (although I do switch back to the user's
   thread). If someone in either the gdb or Cygwin community can provide answers on how
   to do this, I'll file another issue and fix it.