* debugging bash script in emacs using bashdb
@ 2011-06-29 23:22 fiftyeight
2011-06-30 6:41 ` Andreas Röhler
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: fiftyeight @ 2011-06-29 23:22 UTC (permalink / raw)
To: Help-gnu-emacs
Hi, I'm new to emacs and I'm trying to debug bash script with it.
I've downloaded the bashdb package and it works for me
when I use it from the terminal.
But I read in the bashdb website that you can use it with emacs,
they have a link there to a project called emacs-dbgr,
but after downloading and installing the emacs-dbgr
I enter emacs and do M-x load-libarary dbgr like the installation
instructions
say but I just tells me "cannot open load file".
Can anybody tell me how I debug bash scripts using emacs?
either with the emacs-dbgr library or anything else
--
View this message in context: http://old.nabble.com/debugging-bash-script-in-emacs-using-bashdb-tp31959141p31959141.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: debugging bash script in emacs using bashdb
2011-06-29 23:22 debugging bash script in emacs using bashdb fiftyeight
@ 2011-06-30 6:41 ` Andreas Röhler
2011-06-30 11:08 ` Peter Dyballa
2011-06-30 13:08 ` rocky
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Andreas Röhler @ 2011-06-30 6:41 UTC (permalink / raw)
To: help-gnu-emacs
Am 30.06.2011 01:22, schrieb fiftyeight:
>
> Hi, I'm new to emacs and I'm trying to debug bash script with it.
> I've downloaded the bashdb package and it works for me
> when I use it from the terminal.
>
> But I read in the bashdb website that you can use it with emacs,
> they have a link there to a project called emacs-dbgr,
> but after downloading and installing the emacs-dbgr
> I enter emacs and do M-x load-libarary dbgr like the installation
> instructions
> say but I just tells me "cannot open load file".
>
> Can anybody tell me how I debug bash scripts using emacs?
> either with the emacs-dbgr library or anything else
Hi,
when using the command line debugger from the emacs shell -- `M-x shell'
-- you will already have a great advantage, as the output is within the
editor.
Strategically, if you are new to Emacs, I recommend exploring Emacs
itself first rather than running third-party programs, which may need
some adaption. Quit often that jumps into complexity.
Andreas
--
https://code.launchpad.net/~a-roehler/python-mode/components-python-mode
https://code.launchpad.net/s-x-emacs-werkstatt/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: debugging bash script in emacs using bashdb
2011-06-30 6:41 ` Andreas Röhler
@ 2011-06-30 11:08 ` Peter Dyballa
0 siblings, 0 replies; 10+ messages in thread
From: Peter Dyballa @ 2011-06-30 11:08 UTC (permalink / raw)
To: help-gnu-emacs@gnu.org List
Am 30.06.2011 01:22, schrieb fiftyeight:
>> "cannot open load file"
The dbgr library file needs to be saved in a directory recorded in the
variable load-path (can be overridden/augmented by environment
variable EMACSLOADPATH). This way GNU Emacs will find it
automatically. Best is to use a directory "site-lisp", because this is
meant to contain locally maintained ELisp files.
--
Greetings
Pete
A blizzard is when it snows sideways.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: debugging bash script in emacs using bashdb
2011-06-29 23:22 debugging bash script in emacs using bashdb fiftyeight
2011-06-30 6:41 ` Andreas Röhler
@ 2011-06-30 13:08 ` rocky
[not found] ` <mailman.738.1309439719.785.help-gnu-emacs@gnu.org>
[not found] ` <mailman.706.1309416118.785.help-gnu-emacs@gnu.org>
3 siblings, 0 replies; 10+ messages in thread
From: rocky @ 2011-06-30 13:08 UTC (permalink / raw)
To: help-gnu-emacs
fiftyeight <fiftyeight <at> walla.com> writes:
> ... I read in the bashdb website that you can use it with emacs,
> they have a link there to a project called emacs-dbgr,
> but after downloading and installing the emacs-dbgr
> I enter emacs and do M-x load-libarary dbgr like the installation
> instructions
> say but I just tells me "cannot open load file".
>
> Can anybody tell me how I debug bash scripts using emacs?
> either with the emacs-dbgr library or anything else
I think I found the problem (which was introduced recently) and it should be
fixed now. So try again. Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: debugging bash script in emacs using bashdb
[not found] ` <mailman.738.1309439719.785.help-gnu-emacs@gnu.org>
@ 2012-06-15 19:49 ` zackp
2012-06-15 20:04 ` zack.perry
2012-06-15 21:18 ` Rocky Bernstein
[not found] ` <mailman.2896.1339792385.855.help-gnu-emacs@gnu.org>
1 sibling, 2 replies; 10+ messages in thread
From: zackp @ 2012-06-15 19:49 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: rocky, help-gnu-emacs
Hi,
I just tried to install the dbgr package again using the following bash script posted on git hub:
#!/bin/bash
for pkg in emacs-{test-unit,load-relative,loc-changes,dbgr} ; do
echo Trying to install ${pkg}...
git clone http://github.com/rocky/${pkg}.git
(cd $pkg && \
sh ./autogen.sh && ./configure && make && make check && sudo make install
)
done
At the end, I got:
make -C ../../test check
make[3]: Entering directory `/root/emacs-dbgr/test'
(cd ../test && /usr/bin/emacs --batch --no-site-file --no-splash --load test-bp.el)
Cannot open load file: test-simple
make[3]: *** [test-bp.run] Error 255
make[3]: Leaving directory `/root/emacs-dbgr/test'
make[2]: *** [check] Error 2
make[2]: Leaving directory `/root/emacs-dbgr/dbgr/debugger'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/root/emacs-dbgr/dbgr'
make: *** [check-recursive] Error 1
> > say but I just tells me "cannot open load file".
> >
> > Can anybody tell me how I debug bash scripts using emacs?
> > either with the emacs-dbgr library or anything else
>
>
> I think I found the problem (which was introduced recently) and it should be
> fixed now. So try again. Thanks.
I am using GNU Emacs 23.2.1 in Ubuntu 11.04 64bit.
root@nb1:~# emacs --version
GNU Emacs 23.2.1
Copyright (C) 2010 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
In emacs, as myself (regular user, not 'root'), I also encountered the "cannot open load file" error too.
I would appreciate any help.
Regards,
Zack
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: debugging bash script in emacs using bashdb
2012-06-15 19:49 ` zackp
@ 2012-06-15 20:04 ` zack.perry
2012-06-15 21:18 ` Rocky Bernstein
1 sibling, 0 replies; 10+ messages in thread
From: zack.perry @ 2012-06-15 20:04 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: rocky, help-gnu-emacs
OK, I made a bit progress. After some googling, I found this:
https://github.com/rocky/emacs-test-simple
That's where you can get the required test-simple.el
The following bash script should be enhanced with this pre-requisite.
>
> #!/bin/bash
> for pkg in emacs-{test-unit,load-relative,loc-changes,dbgr} ; do
> echo Trying to install ${pkg}...
> git clone http://github.com/rocky/${pkg}.git
> (cd $pkg && \
> sh ./autogen.sh && ./configure && make && make check && sudo make install
> )
> done
>
Will see if I can figure out the rest. But would be grateful to any hints.
Regards,
Zack
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: debugging bash script in emacs using bashdb
2012-06-15 19:49 ` zackp
2012-06-15 20:04 ` zack.perry
@ 2012-06-15 21:18 ` Rocky Bernstein
1 sibling, 0 replies; 10+ messages in thread
From: Rocky Bernstein @ 2012-06-15 21:18 UTC (permalink / raw)
To: zackp; +Cc: help-gnu-emacs, gnu.emacs.help
[-- Attachment #1: Type: text/plain, Size: 2479 bytes --]
I have updated that install script to also install test-simple now. I'm
sorry for the breakage.
The longer story is that I've been converting tests that validate
emacs-dbgr to use a much simpler test framework. I'm in the middle of
converting the tests. As I rarely get feedback on emacs-dbgr I tend to lose
site that anyone other than myself might be installing it for the first
time.
By the way, I think test-simple is cool. My epiphany on this came from a
little talk I gave http://rocky.github.com/NYC-Lisp-Elisp-talk where I
realized that needed too many slide to describe how to write tests.
On Fri, Jun 15, 2012 at 3:49 PM, zackp <zack.perry@sbcglobal.net> wrote:
> Hi,
>
> I just tried to install the dbgr package again using the following bash
> script posted on git hub:
>
> #!/bin/bash
> for pkg in emacs-{test-unit,load-relative,loc-changes,dbgr} ; do
> echo Trying to install ${pkg}...
> git clone http://github.com/rocky/${pkg}.git
> (cd $pkg && \
> sh ./autogen.sh && ./configure && make && make check && sudo make
> install
> )
> done
>
> At the end, I got:
>
> make -C ../../test check
> make[3]: Entering directory `/root/emacs-dbgr/test'
> (cd ../test && /usr/bin/emacs --batch --no-site-file --no-splash --load
> test-bp.el)
> Cannot open load file: test-simple
> make[3]: *** [test-bp.run] Error 255
> make[3]: Leaving directory `/root/emacs-dbgr/test'
> make[2]: *** [check] Error 2
> make[2]: Leaving directory `/root/emacs-dbgr/dbgr/debugger'
> make[1]: *** [check-recursive] Error 1
> make[1]: Leaving directory `/root/emacs-dbgr/dbgr'
> make: *** [check-recursive] Error 1
>
> > > say but I just tells me "cannot open load file".
> > >
> > > Can anybody tell me how I debug bash scripts using emacs?
> > > either with the emacs-dbgr library or anything else
> >
> >
> > I think I found the problem (which was introduced recently) and it
> should be
> > fixed now. So try again. Thanks.
>
> I am using GNU Emacs 23.2.1 in Ubuntu 11.04 64bit.
>
> root@nb1:~# emacs --version
> GNU Emacs 23.2.1
> Copyright (C) 2010 Free Software Foundation, Inc.
> GNU Emacs comes with ABSOLUTELY NO WARRANTY.
> You may redistribute copies of Emacs
> under the terms of the GNU General Public License.
> For more information about these matters, see the file named COPYING.
>
> In emacs, as myself (regular user, not 'root'), I also encountered the
> "cannot open load file" error too.
>
> I would appreciate any help.
>
> Regards,
>
> Zack
>
[-- Attachment #2: Type: text/html, Size: 3181 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: debugging bash script in emacs using bashdb
[not found] ` <mailman.2896.1339792385.855.help-gnu-emacs@gnu.org>
@ 2012-06-15 21:22 ` rocky
2012-06-16 18:42 ` zackp
0 siblings, 1 reply; 10+ messages in thread
From: rocky @ 2012-06-15 21:22 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: rocky, help-gnu-emacs
I have updated that install script to also install test-simple now. I'm sorry for the breakage.
The longer story is that I've been converting tests that validate emacs-dbgr to use a much simpler test framework. I'm in the middle of converting the tests. As I rarely get feedback on emacs-dbgr I tend to lose site that anyone other than myself might be using it let alone installing it for the first time.
By the way, I think test-simple is cool. My epiphany on this came from a little talk I gave http://rocky.github.com/NYC-Lisp-Elisp-talk where I realized that needed too many slide to describe how to write tests.
On Friday, June 15, 2012 3:49:59 PM UTC-4, zackp wrote:
> Hi,
>
> I just tried to install the dbgr package again using the following bash script posted on git hub:
>
> #!/bin/bash
> for pkg in emacs-{test-unit,load-relative,loc-changes,dbgr} ; do
> echo Trying to install ${pkg}...
> git clone http://github.com/rocky/${pkg}.git
> (cd $pkg && \
> sh ./autogen.sh && ./configure && make && make check && sudo make install
> )
> done
>
> At the end, I got:
>
> make -C ../../test check
> make[3]: Entering directory `/root/emacs-dbgr/test'
> (cd ../test && /usr/bin/emacs --batch --no-site-file --no-splash --load test-bp.el)
> Cannot open load file: test-simple
> make[3]: *** [test-bp.run] Error 255
> make[3]: Leaving directory `/root/emacs-dbgr/test'
> make[2]: *** [check] Error 2
> make[2]: Leaving directory `/root/emacs-dbgr/dbgr/debugger'
> make[1]: *** [check-recursive] Error 1
> make[1]: Leaving directory `/root/emacs-dbgr/dbgr'
> make: *** [check-recursive] Error 1
>
> > > say but I just tells me "cannot open load file".
> > >
> > > Can anybody tell me how I debug bash scripts using emacs?
> > > either with the emacs-dbgr library or anything else
> >
> >
> > I think I found the problem (which was introduced recently) and it should be
> > fixed now. So try again. Thanks.
>
> I am using GNU Emacs 23.2.1 in Ubuntu 11.04 64bit.
>
> root@nb1:~# emacs --version
> GNU Emacs 23.2.1
> Copyright (C) 2010 Free Software Foundation, Inc.
> GNU Emacs comes with ABSOLUTELY NO WARRANTY.
> You may redistribute copies of Emacs
> under the terms of the GNU General Public License.
> For more information about these matters, see the file named COPYING.
>
> In emacs, as myself (regular user, not 'root'), I also encountered the "cannot open load file" error too.
>
> I would appreciate any help.
>
> Regards,
>
> Zack
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: debugging bash script in emacs using bashdb
[not found] ` <mailman.706.1309416118.785.help-gnu-emacs@gnu.org>
@ 2012-06-15 21:28 ` rocky
0 siblings, 0 replies; 10+ messages in thread
From: rocky @ 2012-06-15 21:28 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: help-gnu-emacs
On Thursday, June 30, 2011 2:41:42 AM UTC-4, Andreas Röhler wrote:
> Am 30.06.2011 01:22, schrieb fiftyeight:
> >
> > Hi, I'm new to emacs and I'm trying to debug bash script with it.
> > I've downloaded the bashdb package and it works for me
> > when I use it from the terminal.
> >
> > But I read in the bashdb website that you can use it with emacs,
> > they have a link there to a project called emacs-dbgr,
> > but after downloading and installing the emacs-dbgr
> > I enter emacs and do M-x load-libarary dbgr like the installation
> > instructions
> > say but I just tells me "cannot open load file".
> >
> > Can anybody tell me how I debug bash scripts using emacs?
> > either with the emacs-dbgr library or anything else
>
> Hi,
>
> when using the command line debugger from the emacs shell -- `M-x shell'
> -- you will already have a great advantage, as the output is within the
> editor.
One of the cool things about emacs-dbgr is that yes you can start off in a shell and then later go into a minor mode which tracks your position from debugger output. This is set up via M-x dbgr-track-mode. And as with other modes one can turn that on or off or switch the kinds of debuggers one is working with.
That said, for those that want more context shown inside the shell (whether in emacs or not) bashdb and a number of other debuggers have the command "set autolist on".
>
> Strategically, if you are new to Emacs, I recommend exploring Emacs
> itself first rather than running third-party programs, which may need
> some adaption. Quit often that jumps into complexity.
>
>
> Andreas
>
> --
> https://code.launchpad.net/~a-roehler/python-mode/components-python-mode
> https://code.launchpad.net/s-x-emacs-werkstatt/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: debugging bash script in emacs using bashdb
2012-06-15 21:22 ` rocky
@ 2012-06-16 18:42 ` zackp
0 siblings, 0 replies; 10+ messages in thread
From: zackp @ 2012-06-16 18:42 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: rocky
Hi Rocky,
> I have updated that install script to also install test-simple now. I'm sorry for the breakage.
Many thanks for the quick help! May I remind you that you updated the
following:
https://raw.github.com/rocky/emacs-dbgr/master/install-from-git.sh
but the snippet in the section The full instructions is still missing
the test-simple. Should I open an Issue there as reminder, or this
follow-up is sufficient for you?
>
> The longer story is that I've been converting tests that validate emacs-dbgr to use a much simpler test framework. I'm in the middle of converting the tests. As I rarely get feedback on emacs-dbgr I tend to lose site that anyone other than myself might be using it let alone installing it for the first time.
>
It's a pity that to many people, their way of debugging bash/sh script
is still the -v option! They are missing bashdb big time!
> By the way, I think test-simple is cool. My epiphany on this came from a little talk I gavehttp://rocky.github.com/NYC-Lisp-Elisp-talkwhere I realized that needed too many slide to describe how to write tests.
Definitely will check it out. Last night, I switched to Emacs 24 on
this notebook running Ubuntu 11.04. So far so good. bashdb runs fine
happily so far.
Best Regards, and have a great weekend,
Zack
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-06-16 18:42 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-29 23:22 debugging bash script in emacs using bashdb fiftyeight
2011-06-30 6:41 ` Andreas Röhler
2011-06-30 11:08 ` Peter Dyballa
2011-06-30 13:08 ` rocky
[not found] ` <mailman.738.1309439719.785.help-gnu-emacs@gnu.org>
2012-06-15 19:49 ` zackp
2012-06-15 20:04 ` zack.perry
2012-06-15 21:18 ` Rocky Bernstein
[not found] ` <mailman.2896.1339792385.855.help-gnu-emacs@gnu.org>
2012-06-15 21:22 ` rocky
2012-06-16 18:42 ` zackp
[not found] ` <mailman.706.1309416118.785.help-gnu-emacs@gnu.org>
2012-06-15 21:28 ` rocky
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.