Re: jdb issue

exits funnel <[email protected]> Wed, 13 Sep 2006 09:30:30 -0700 (PDT)
Newsgroups gmane.emacs.jdee
Message-ID <[email protected]>
Hi Suraj,

This seems to have worked so thank you so much. 
Shouldn't this be the default behavior or is that
usually the case and there is just something strange
about my system which required the special code? 
Either way, thanks again; this has been bothering me
for some time.

-exits

--- Suraj Acharya <[email protected]> wrote:

> Try this:
> 
> (defun jde-db-set-debug-cursor (class file line)
>   "Shows the source at LINE in CLASS."
>   (let* ((buffer (jde-db-find-class-source class))
>          pos)
>     (if buffer
> 	(progn
> 	  (if (not (get-buffer-window buffer))
> 	      (display-buffer buffer t))
> 	  (save-excursion
> 	    (set-buffer buffer)
> 	    (save-restriction
> 	      (widen)
> 	      (goto-line line)
> 	      (setq pos (point))
> 	      (setq overlay-arrow-string "=>")
> 	      (or overlay-arrow-position
> 		  (setq overlay-arrow-position (make-marker)))
> 	      (set-marker overlay-arrow-position (point)
> (current-buffer)))
> 	    (cond ((or (< pos (point-min)) (> pos
> (point-max)))
> 		   (widen)
> 		   (goto-char pos))))
> 	  (set-window-point (get-buffer-window buffer)
> overlay-arrow-position)))))
> 
> 
> 
> On 9/12/06, exits funnel <[email protected]>
> wrote:
> 
> 
> > Hello,
> >
> > What follows is a repost of an email I sent to the
> > list last month.  It's still an issue for me and I
> > really wish I could figure out how to solve it.
> > Essentially I'm just trying to figure out how to
> get
> > the jdb command window to stay anchored and always
> > visible.  The behavior I'd like is that the frame
> is
> > split horizontally with the jdb command buffer on
> top
> > and the current source buffer on the bottom.  When
> I
> > issue a step command which cuases control to be
> passed
> > to a different source file I'd like the new source
> > file to replace the current source file and *not*
> the
> > jdb command buffer.  The environment is native
> emacs
> > 21.3.1 on Win2k and jde 2.3.5.1.  If anyone could
> help
> > me out here, I'd really apprciate it.  Thanks in
> > advance.
> >
> > // REPOST
> > I've recently begun using the jdee interface to
> jdb
> > for debugging.  I'm having pretty good success
> though
> > there is one issue I'm having trouble with.  This
> can
> > probably just be chalked up to my (relative) lack
> of
> > experience with emacs but, in any event, the issue
> is
> > this:  After I've launched jdb from the JDE menu,
> I
> > end up with the frame split horizontally into two
> > buffers.  The top half contains the jdb buffer and
> the
> > bottom one contains the source file with my main
> > function.  From the jdb buffer I issue 'cont' and
> the
> > cursor in the source runs to the breakpoint I've
> got
> > set in the main method.  So far so good.  The
> problem
> > occurs when I step into source located in another
> > file.  The new source file replaces the debug
> buffer
> > rather than the other source buffer.  This happens
> > everytime I step into a method in a different
> soruce
> > file.  The result is that I'm constantly issuing
> 'C-x
> > o C-x b' to return things to the way I want them. 
> I
> > guess that this is all a long winded way of
> asking: Is
> > there some setting I can make which will assure
> that
> > the jdb window will always be visible?  How do
> other
> > people handle this?  Am I doing something really
> dumb?
> >  Thanks in advance, for any thoughts.
> >
> > -exits
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com