From: R. B. <ro...@pa...> - 2003-02-23 21:02:13
|
bas...@li... writes: > Is there a way to continue debugging into a secondary > shell script that is called by the main script? When I > tried debugging the main script, I was able to > single-step through the script (using DDD with bashdb) > - worked great. But the script calls another script > and bashdb simply ran that script. Is there a way to > cause the second script to also run in the debugger? You can do this with the "debug" debugger command: deb [script] Set up [script] for debugging. If no script is given, take the script name from the command to be executed. Long command name: debug. You won't find a button for this in ddd -- probably the only other place where it might make sense is for Perl. When you debug into or out of a script in ddd, the display I think is messed up for a line. I don't know of a way to force ddd to refresh the display. As far as I can tell ddd development has been dead for 2 years. If "debug" is something you want to create a custom button for, you can do so via the menus: Commands Edit Buttons uncheck enable supported buttons only in text box add the word "debug". - - - By the way, in testing the above I tried debugging this this on a script which contained the "~" character. The current bashdb can't handle this but I've just changed the CVS version to fix this. If associative arrays are added to bash or this is ported to ksh, this kind of adding funny characters won't be a problem since untranslated filenames could used as indexes. |
From: Rick H. <ric...@ya...> - 2003-02-24 06:41:26
|
Hi Rocky, Thanks for your help. I got the "deb" command working from ddd and figured out how to display the subscript's source while debugging -- very cool. I have a couple of other questions though, and would greatly appreciate some help if you can. 1. I'm able to use ddd with bashdb by typing: ddd --bash build.sh ...but when I type: bashdb -L . build.sh ...alone, as from the bashdb manual example, I get the following error: bashdb: cannot read debugger file ./dbg-main.inc. bashdb: Perhaps bashdb is installed incorrectly. ...however, dbg-main.inc does exist in the following 2 directories: /home/rick/programs/bash-2.05b-debugger-0.36/debugger/dbg-main.inc /usr/local/lib/bashdb/dbg-main.inc (Note: the first directory is the one in which I did the build.) The file access attributes are: -rw-r-r-- 1 root root for the file in /usr/local/lib/bashdb. I executed the "make" steps as a regular user, and switched to "su" for the "make install". 2. ddd breakpoint problem. I am able to set a breakpoint in my script in ddd, but the little "Stop Sign" is not displayed in the source panel. The only way I can view breakpoints is to select the menu item Source/Breakpoints... Minor problem, but still a bit bothersome. Thanks again for your help. Rick --- "R. Bernstein" <ro...@pa...> wrote: > bas...@li... writes: > > Is there a way to continue debugging into a > secondary > > shell script that is called by the main script? > When I > > tried debugging the main script, I was able to > > single-step through the script (using DDD with > bashdb) > > - worked great. But the script calls another > script > > and bashdb simply ran that script. Is there a way > to > > cause the second script to also run in the > debugger? > > You can do this with the "debug" debugger command: > > deb [script] Set up [script] for debugging. If > no script is given, take > the script name from the command to > be executed. > Long command name: debug. > > You won't find a button for this in ddd -- probably > the only other > place where it might make sense is for Perl. When > you debug into or > out of a script in ddd, the display I think is > messed up for a line. I > don't know of a way to force ddd to refresh the > display. As far as I > can tell ddd development has been dead for 2 years. > > If "debug" is something you want to create a custom > button for, you > can do so via the menus: > > Commands > Edit Buttons > uncheck enable supported buttons only > in text box add the word "debug". > > - - - > > By the way, in testing the above I tried debugging > this this on a > script which contained the "~" character. The > current bashdb can't > handle this but I've just changed the CVS version to > fix this. If > associative arrays are added to bash or this is > ported to ksh, this > kind of adding funny characters won't be a problem > since untranslated > filenames could used as indexes. > > > ------------------------------------------------------- > This SF.net email is sponsored by: SlickEdit Inc. > Develop an edge. > The most comprehensive and flexible code editor you > can use. > Code faster. C/C++, C#, Java, HTML, XML, many more. > FREE 30-Day Trial. > www.slickedit.com/sourceforge > _______________________________________________ > Bashdb-devel mailing list > Bas...@li... > https://lists.sourceforge.net/lists/listinfo/bashdb-devel __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ |