attaching jdb to tomcat on localhost
Hi Emory, It would be nice to try to isolate the problems that you are experiencing, in particular, to try to determine if the problems are with jdb or with Emacs/JDEE or with the two in combination. A way to do this is to try a few debugging sessions, using the jdb command line interface alone. My suspicion is that the problem is with jdb on the Macintosh and that you'll experience the same problems if you try using jdb standalone. Paul Emory Smith writes: > hi, > > ive been using jde for some time to debug webapps deployed locally on a > tomcat server and have consistently had a couple of annoying problems. > > i set things up like so: > > * start tomcat in listen mode ... open browser > * start emacs ... build and deploy to tomcat using jde-ant-build > * attach using jde-jdb-attach-via-socket > * set a breakpoint and refresh browser > > at this point, everything works great -- breakpoint is hit, and jdb > runs without a hitch ... i do my stuff and then "cont" ... the browser > page finishes loading ... > > 9 times out of 10, thats the extent of my debugging session ... if i > want it to work again, i will have to quit tomcat at the least to get > any of it to work again (usually i have to actually kill off all > running java processes before tomcat will be able to connect to the > listen port again). and even if tomcat connects, i can no longer set > breakpoints in any of my source files -- jdb will say "unable to set > breakpoint ... no code at line xxx". ive tried everything i can think > of (clearing breakpoints, quiting jdb, detaching, closing browser, etc > ) and in every possible order ... but it practically never works a > second time. and when it does, jdb will invariably end up stepping > into some obscure java or tomcat class and i can type cont 200 times > without ever getting back to my own code ... > > but as soon as i save files, quit jde, quit emacs, close my browsers, > quit tomcat, grep top for java and kill off any running java processes > (which are often very high cpu usage), wait for a little while, start > tomcat back up, start emacs, run ant remove/compile/install, start jdb > and attach to tomcat, set my breakpoint again, open the browser back up > and return to the page ... boom - it hits the breakpoint and i can > debug once again... > > it seems like there should be a more efficient way to go about this, so > i was hoping someone might be able to point me in the right direction. > i apologize if this has been explained/discussed here already (though i > couldnt find anything like it in the archives). > > also, im running mac os10.3.6 (though this has happened since 10.2.x) > on a powerbook g4. > (carbon) emacs 21.3.5, jdee 2.3.4, tomcat 5.0.27, jre 1.4.2, ant 1.6.1, > > thanks for any suggestions anyone might have, > emory >
ECB 2.31 released!!
ECB 2.31 is released! It's strongly recommended to install this release if you use native Windows XEmacs! What's new in the new release: -- * Changes for ECB version 2.31 ** Fixed bugs *** Fixed a recently introduced bug with XEmacs and an active isearch. This bug occured when a user has clicked onto a node in a tree-buffer during an active isearch and it had as result completely out-of-order tree-buffers. This buf is now fixed and should never occur. *** Fixed a bug concerning accessing root-drives in native window-XEmacs Fixes an annoying behavior of the native windows-version of XEmacs: When a path contains only a drive-letter and a : (e.g. C:) then `expand-file-name' (and a lot of other file-operations) do not interpret this path as root of that drive. So ECB adds temporary a trailing `directory-sep-char' and calls file-operations like `expand-file-name' with this new path because then `expand-file-name' treats this as root-dir of that drive. For all (X)Emacs-version besides the native-windows-XEmacs this fix is not needed and takes no effect. *** Better recognizing of remote CVS-root-repositories for the VC-support ** Enhancement for the VC-support *** New option `ecb-vc-xemacs-exclude-remote-cvs-repository' This excludes directories with a remote cvs-repository from VC-check. This option takes only effect for XEmacs and is needed cause of the outdated VC-package of XEmacs which offers no heuristic state-checking and also no option `vc-cvs-stay-local'. So this option takes only effect if `vc-cvs-stay-local' is not avaiable. In this case ECB treats directories which are managed by CVS but have a remote repository as if the directory would not being managed by CVS (so the files are not checked for their VC-state). This is done to avoid blocking XEmacs cause of running full cvs-commands (e.g. ``cvs status'') for a bunch of files over the net. *** Added beta-support for Clearcase There is already an identify-backend-function `ecb-vc-dir-managed-by-CC' and a check-state-function `ecb-vc-check-CC-state' and an advice for `clearcase-sync-from-disk' which enable automatic state-update after checkin/out. These code seems to work quite well but nevertheless there are some problems so this Clearcase-support is not added per default to `ecb-vc-supported-backends'. So if you want Clearcase-support you have to customize the option `ecb-vc-supported-backends' and add these functions mentioned above (the advice of `clearcase-sync-from-disk' takes only effect if the function `ecb-vc-dir-managed-by-CC' can be found in `ecb-vc-supported-backends' and ECB is active!). But use it at your own risk. Of course the best would be if a lot of people would test this Clearcase-support and fix the encountered problems ;-). Thanks to David Ostrovsky for providing a first implementation! How to get it: -- Sorry, it's too big to post the sources here... If you are using ECB >= 1.80 then you can just call "M-x ecb-download-ecb" if you are online. ECB will then download autom. latest and newest ECB and install it for you. Or go to the homepage at http://ecb.sourceforge.net and download it from there. General description of ECB: --- ECB stands for "Emacs Code Browser". While Emacs already has good *editing* support for many modes, its *browsing* support is somewhat lacking. That's where ECB comes in: it displays a number of informational windows that allow for easy source code navigation and overview. The informational windows can contain: - A directory tree, - a list of source files in the current directory, - a list of functions/classes/methods/... in the current file, (ECB uses the Semantic Bovinator, or Imenu, or etags, for getting this list so all languages supported by any of these tools are automatically supported by ECB too) - a history of recently visited files, - the Speedbar and - output from compilation (the "*compilation*" window) and other modes like help, grep etc. or whatever a user defines to be displayed in this window. As an added bonus, ECB makes sure to keep these informational windows visible, even when you use C-x 1 and similar commands. It goes without saying that you can configure the layout, ie which informational windows should be displayed where. ECB comes with a number of ready-made window layouts to choose from. Here is an ascii-screenshot of what ECB offers you: -- | | | | Directories | | | | | |--|