From: David C. <dav...@fr...> - 2012-10-11 08:47:01
|
Hera and everyone, If you want to use the GUD interface, then I suggest you fix a few cosmetic problems in matlab.el and just replace the current code with: (gud-def gud-finish "dbstep out" "\C-f" "Finish executing current function.") (gud-def gud-up "dbup(%p)" "<" "Up N stack frames (numeric arg).") (gud-def gud-down "dbdown(%p)" ">" "Down N stack frames (numeric arg).") If you feel that's useful, you can also add the following lines: (gud-def gud-stop-subobj "dbquit" "\C-k" "Kill execution of the current function") (gud-def gud-until "dbstop at %l in %f; dbcont; dbclear at %l in %f" "\C-u" "Run until cursor or first breakpoint") Hope that helps, David. _____ From: Hera He [mailto:nj...@gm...] Sent: 10 October 2012 23:11 To: Uwe Brauer Cc: mat...@li... Subject: Re: [Matlab-emacs-discuss] Debugging intro? Hi Uwe and Torben, Thank you so much for your replies!! It is working with me now! And I also found there is another way of debugging using GUD(Grand Unified Debugger), so we have all kinds of shortcuts for continue, step and next etc. you could check out the info page by M-x gud-goto-info. Thank you guys again!! Cheers, Hera On Wed, Oct 10, 2012 at 2:28 AM, Uwe Brauer <ou...@ma...> wrote: >> On Wed, 10 Oct 2012 07:30:50 +0000, Torben Knudsen <tk...@es...> wrote: > I have used matlab-mode for years. Never the less I am also missing a > short guide to setting up everything in a convenient way. I simply > use the matlab db commands in the matlab-shell window but I do not > know how to make some pointer follow the relevant source code. Also, > I tried to look into a good way of using ECB yesterday but kind of ran > out of time before figuring out something. Maybe I miss something elementary. I do the following. (Using Xemacs 21.5.32 (GNU emacs is a little nicer with debugging but anyhow) In my matlab file, say test.m I start the matlab shell Then I do in the shell: >> dbstop test dbstop test >> test test 3 clear all K>> dbstep dbstep 4 A=[0 1 -1;-3 4 -1;-1 1 2] K>> dbquit dbquit >> So the window is split and repeating dbstep I see an arrow advancing in the m file and the result in the shell. It is not as nice as the emacs edebug function for lisp, but it is good enough. Uwe Brauer |