octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Edit in debug mode


From: Markus Appel
Subject: Edit in debug mode
Date: Fri, 15 Nov 2013 14:38:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

Hi,

I was looking for an easy solution to open an editor from the command line debugger which brings me directly to the point where the execution is stopped in the current frame. I came up with the following:

function varargout = dbedit()
  if isdebugmode
    [stack,idx] = evalin("caller","dbstack()");
system(sprintf("gedit -b %s +%d:%d",stack(idx).file,stack(idx).line,stack(idx).column));
    if nargout>0
      varargout={stack,idx};
    endif
  else
    warning("Not in debug mode.");
  endif
endfunction
Is there any interest in incorporating a feature like this in the debugger or in the existing edit command? It would of course need a proper configuration interface for the editor.

Cheers,
Markus


reply via email to

[Prev in Thread] Current Thread [Next in Thread]