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.
Create any makefile based project for cygwin and try to debug. The result is that executable fails, windows message about app crash appears, after that IDE hangs for several seconds and message "The process can not be debugged..." appears.
Created attachment 72761 [details] gdb log
The problem is that gdb is run without proper environment (i.e. cygwin libs). In fact it runs with empty environment (second line in the log)
QA please check for ShowStopper status. To me it sounds very severe.
It's impossible to debug makefile using cygwin but debugger works fine with MinGW. It's seems to be a problem with cygwin gdb. Anyway I confirm that it's a showstopper.
After some experiments we found out that Makefile-based projects' debugging doesn't work if there is no cygwin in PATH. At the same time managed projects' debugging works. The reason is that env is not set during debugging start for Makefile-based project (as we can see in gdb-logs) P.S.: I believe this is not a showstopper, because there is a simple workaround: add cygwin to PATH.
Egor said: > The problem is that gdb is run without proper environment (i.e. cygwin libs). > In fact it runs with empty environment (second line in the log) These are 2 different issues. The 1st line is critical (cygwin libs) but the 2nd line is OK. The empty environment refers to environment variables added at the project level, not the normal user's environment. Sergey said: > P.S.: I believe this is not a showstopper, because there is a simple workaround: add cygwin to PATH I also agree with this. While I agree that we should add cygwin to the path (in code), its been this way for 5 or 6 releases so I find it hard to consider this a showstopper.
Workaround: - add path to 'cygwin\bin' to 'Path' environment variable - restart IDE with a fresh userdir or remove current userdir and restart IDE
I believe it should work with both cygwin and MinGW projects.
see also issue #153068
I do not think this is really a bug. Our installation and setup instructions for the tool coolections explicitly tell users to add the tools they install to their path. So the situation described here will not occur if they follow the instructions in the documentation.
> I do not think this is really a bug Its a bug if for no other reason than Debug behavior is different than Run behavior. But even though we document that the user needs to have the Cygwin directory in their path, its still something we can overcome if they don't. Its much better to proactively fix the user's problem, although in this case it does break the contract that anything runnable/debuggable in the IDE is r/d from the command line.
Fixed with http://hg.netbeans.org/main?cmd=changeset;node=746cf88cb89c
Integrated into 'main-golden', will be available in build *200811140201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/746cf88cb89c User: Gordon Prieur <gordonp@netbeans.org> Log: Fixed IZ #151577 Unable to debug Makefile based projects
Now cygwin/gdb works but MinGW/gdb does not. Breakpoints get broken if the project uses MinGW tool collection. Please see attached gdb log
Created attachment 73966 [details] gdb log
Created attachment 74029 [details] gdb log for the latest dev build
The issue didn't pass the nomination process by nomination cut-off date. It has been marked as 65fixes2-candidate.
Fixed with http://hg.netbeans.org/main?cmd=changeset;node=4ba7761f4676 I ran your (Alexander's) test_io with gdb.logger.level=WARNING and it immediately showed that the path comparison failed because one path started with "C:" and the other with "c:". I added some path magic to equivalent paths should work (on Windows I change all backslashes to forward slash and all uppercase to lower; on MacOS I change case to lower). Since your test app let me duplicate the problem, I'm closing as fixed. Please reopen if you still see the same problem.
Integrated into 'main-golden', will be available in build *200811281401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/4ba7761f4676 User: Gordon Prieur <gordonp@netbeans.org> Log: Fixed IZ #151577 Unable to debug Makefile based projects
verified in build 200812120201
Hello, it impossible to apply mentioned changeset(s) to release65_fixes [ref1] branch because a lot of non-this IZ related changes were made and other changesets pushed into main [ref2] repository between release65_fixes branching time and mentioned changeset(s) pushing time. Please provide cumulative changeset/ set of changesets applicable to release65_fixes branch otherwise this fix will be skipped for current NB65 patch. This problem is common for following IZs: 151761, 151610, 151577, 133134, 155487 [ref1]: http://hg.netbeans.org/release65_fixes [ref2]: http://hg.netbeans.org/main
verified in NB6.5 with provided jar files
Cumulative backport of fixes of IZ 151481(rebackport), 151577, 151610, 153473, 151640, 151761, 155487, 151631, 133134 provided by developer. Backported into release65_fixes branch http://hg.netbeans.org/release65_fixes/rev/84a0c7175a4b
verified in patch2