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 256075 - On Windows Attach doesn't work
Summary: On Windows Attach doesn't work
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.1
Hardware: PC All
: P2 normal (vote)
Assignee: Maria Tishkova
Keywords: RELNOTE
Depends on:
Reported: 2015-10-21 12:02 UTC by soldatov
Modified: 2016-12-14 14:32 UTC (History)
1 user (show)

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 soldatov 2015-10-21 12:02:26 UTC
I verified different tools (Cygwin and MinGW), NetBeans 8.0.2 and NetBeans 8.1. But Attach doesn't work. This problem should be resolved if we want to demonstrate JNI debug on Windows.
Comment 1 soldatov 2015-10-21 12:24:31 UTC

#include <stdio.h>
#include <unistd.h>
int main(int argc, char** argv) {
    for (int i = 0; i < 100; i++) {
        printf("%d\n", i);
    return 0;
Comment 2 Maria Tishkova 2016-11-15 13:06:25 UTC
I could not attach to the running program using the code here on Windows with DDD and gdb but it doesn't work. So it doesn't look like a problem with NetBeans but like a problem with GDB.
Need more investigation
Comment 3 soldatov 2016-12-13 13:35:38 UTC
Workaround on Windows + Cygwin64

I can attach debugger if I do such steps:
- run sample in IDE
- call Attach wizard, select process, select project and push OK button
- set line breakpoint on 'printf' or 'sleep' line
- Push Window|Debugging|Debugger Console
- type where and press Enter
==> strange stack
#0  0x00000000778fafb1 in ntdll!DbgBreakPoint () from /cygdrive/c/windows/SYSTEM32/ntdll.dll
#1  0x00000000779a2e08 in ntdll!DbgUiRemoteBreakin () from /cygdrive/c/windows/SYSTEM32/ntdll.dll
#2  0x00000000776a59cd in KERNEL32!BaseThreadInitThunk () from /cygdrive/c/windows/system32/kernel32.dll
#3  0x00000000778da561 in ntdll!RtlUserThreadStart () from /cygdrive/c/windows/SYSTEM32/ntdll.dll
#4  0x0000000000000000 in ?? ()

- type 'c' and press Enter
- type 'where' again and press Enter
==> good stack
#0  main (argc=1, argv=0xffffcc60) at main.cpp:6

- type 'n' and press Enter
==> Debugger GUI appears and I can debug sample via NetBeans