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.
It would be useful to have an action in the IDE to write thread dump text into messages.log. Currently the only way to dump thread information is on console. The action could have an icon on toolbar (why not the Memory toolbar). I believe that method Thread.getAllStackTraces() could be used for that.
it is nice OTOH the expectation of UI designers is that this should not be exposed too much. BTW: if you run on mustang there should be 'jps' for finding proces ID and 'jstack' to generate the thread dump so even if the IDE is started without console it should be possible to generate the dump. Of course this does not solve the requirement to print it into messages.log
perhaps we can hook into thread dump request with JVMTI agent registering callback for DataDumpRequest. Given that jps is part of Sun's JDK distro this is low priority.
Dirty trick how to send thread dump into log (though not the same file as IDE log): -J-XX:+UnlockDiagnosticVMOptions -J-XX:+LogVMOutput -J-XX:LogFile=vm.log This RFE will be probably won't fix unless we want to add native code for this.
Why can't you use Throwable.getStackTrace() for this? It probably does not include as much information as the JRE dump (might be missing information about monitors) but it's worth a look.
There are two different ideas: 1) reroute thread dump produced currently on signal from console to log (or duplicate it there). I'd like to implemnt this but do not see a way. 2) Add UI for printing dump. This can be achieved as Gili suggests but maybe it can be useful as some experimental module. Still your code has to run so at least EDT has to allow processing. Personally I consider this too low priority. Feel free to write such plugin.
Wouldn't this issue be tied to the RFE for automated filing of bug reports? Unfortunately, I don't have the issue number handy, but it seems to me that these two RFEs might be related in some way.
Automated filing of bugs: it might be usefull for certain types OTOH I do not think we have to tie these two issues together as they can be done independently.
*** Issue 1035 has been marked as a duplicate of this issue. ***
Fuj, this is a duplicate of #1035, not vice versa. Why did you make this one as the primary one? It would be kind of nice to fix #1035, wouldn't it? ;-)