From: Eric L. <Eri...@ma...> - 2013-01-15 21:57:21
|
Hi, The MATLAB command prompt and commands you type in is MATLAB. If you went to an xterm, and type: matlab -nodesktop you would get the same interface to MATLAB. The prompt does not take gud commands. gud commands would go through Emacs. For example, you would type: plot(1:10) at the >> prompt in the buffer to do some MATLAB thing, or: dbstop in myfcn at the same place to get to the K>> prompt. To do gud things, type: M-x gud-step RET to run the Emacs GUD command. The matlab shell is supposed to add the GUD menu to matlab-mode buffers (where your source code is) when it sees the K prompt. Unfortunately, MATLAB sometimes is updated faster than I can keep the Emacs mode up to date, so it is possible that broke. In the matlab shell, you can always use the keybindings though, such as C-c C-n to do a 'next'. You can do C-h b to key mode bindings. Eric From: newsboost [mailto:new...@gm...] Sent: Friday, January 04, 2013 5:45 AM To: mat...@li... Subject: [Matlab-emacs-discuss] debugging: GUD seems not to be working ? Hi, I'm totally new with matlab in emacs, but it looks great - I found a good source of information here: http://blog.angjookanazawa.com/post/8815280589/productivity-matlab-emacs-integration-more What I did, was to use the package software tool (synaptic) in ubuntu to dowload "matlab-support" and I didn't do all the CVS-stuff to download anything other than this (maybe that's what I did wrong?). Anyway, I tried "M-x matlab-shell" and it seemed to work immediately! What I found looked (=looks) so great and cool. I can now type things exactly as in Matlab and plot graphs from inside of emacs using e.g. "plot(1:5, 2:6)" etc. Last thing that would make me really happy is to have debugging work in a nice way. I don't have a GUD-menu. I tried "dbstop matlabfile.m linenumber" and then "run matlabfile" (without the .m-extension) and voila, it ran and stopped at that place. So far so good. Then I typed: "dbstep" and I can see that this works too. It steps a line ahead... But I think I should have a GUD-menu... I tried "M-x gud-step" and it writes: K>> gud-step gud-step {??? Undefined function or variable 'gud'. } K>> if usejava('jvm'), com.mathworks.services.Prefs.setBooleanPref('EditorGraphicalDebugging', false); end K>> gud-step gud-step {??? Undefined function or variable 'gud'. } I want to assign a single key for "next", "step", "continue" etc... Isn't something wrong here? Shouldn't I have a GUD menu ? Please comment on this, thank you very much... I would like single-key debugging turned on and then I think maybe I'll get rid of this matlab-stuff and only use emacs in the future (I hope)... Thanks for ANY comments/ideas/suggestions... |