Unix Shell - IDE for ksh

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > January 2006 > IDE for ksh





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author IDE for ksh
Chuck

2006-01-18, 5:55 pm

Can anyone recommend an IDE (integrated development environment) for ksh
scripting? I just want to be able to single step through scripts and
watch variables. My platforms are cygwin and solaris 8.

TIA
--
To reply by email remove "_nospam"
Michael Vilain

2006-01-19, 2:57 am

In article <gByzf.9230$8r1.2246@trndny01>,
Chuck <skilover_nospam@bluebottle.com> wrote:

> Can anyone recommend an IDE (integrated development environment) for ksh
> scripting? I just want to be able to single step through scripts and
> watch variables. My platforms are cygwin and solaris 8.
>
> TIA


emacs
vi

(take your pick)

No, I'm not kidding. Either can run scripts in a subshell and capture
the output for testing.

--
DeeDee, don't press that button! DeeDee! NO! Dee...



Chuck

2006-01-19, 6:24 pm

Michael Vilain wrote:
> In article <gByzf.9230$8r1.2246@trndny01>,
> Chuck <skilover_nospam@bluebottle.com> wrote:
>
>
> emacs
> vi
>
> (take your pick)
>
> No, I'm not kidding. Either can run scripts in a subshell and capture
> the output for testing.
>


An IDE is more than just an editor that you can shell out from and run a
script. I want something where I can use a single keystroke to step
through the script executing one line at a time, with a window somewhere
automatically updating the value of variables as they change. I want to
be able to see both the code and the variables on the same display. I
want to be able to set breakpoints as well. I'm very familiar with vi
and it doesn't come close to what I want. Can emacs do any of this? I've
never taken the time to learn it.

TIA

--
To reply by email remove "_nospam"
Janis Papanagnou

2006-01-19, 6:24 pm

Chuck wrote:
> Can anyone recommend an IDE (integrated development environment) for ksh
> scripting?


I don't know of one, other than the shell itself (using the -x option).

> I just want to be able to single step through scripts and
> watch variables.


If you need just that you don't need an IDE, rather you want a debugger.
I know of a simple debugger that is described in Rosenblatt's book (and
the ksh source code of the debugger had been made available on the web).
It may be less than you expect, though, especially no GUI.

> My platforms are cygwin and solaris 8.


Janis
Michael Vilain

2006-01-19, 6:24 pm

In article <4LOzf.9391$2x4.827@trndny05>,
Chuck <skilover_nospam@bluebottle.com> wrote:

> Michael Vilain wrote:
>
> An IDE is more than just an editor that you can shell out from and run a
> script. I want something where I can use a single keystroke to step
> through the script executing one line at a time, with a window somewhere
> automatically updating the value of variables as they change. I want to
> be able to see both the code and the variables on the same display. I
> want to be able to set breakpoints as well. I'm very familiar with vi
> and it doesn't come close to what I want. Can emacs do any of this? I've
> never taken the time to learn it.
>
> TIA


Since ksh is interpeted, I'm not sure you'll find what you're looking
for here. An interactive debugger able to access the variables and
datastructures of ksh would require emulating the ksh running on your
system. I know such a beast exists for PERL but I don't think one does
for ksh.

To debug shell scripts, I've done it the old-fashioned way with "sh -x
<file>". Should work the same way on ksh. If a shell script is so
complicated that this is a burden, I use another language like PERL with
more features (e.g. the symbolic debugger) and extensability.

--
DeeDee, don't press that button! DeeDee! NO! Dee...



Paul D. Smith

2006-01-19, 6:24 pm

%% Michael Vilain <vilain@spamcop.net> writes:

mv> Since ksh is interpeted, I'm not sure you'll find what you're looking
mv> for here. An interactive debugger able to access the variables and
mv> datastructures of ksh would require emulating the ksh running on your
mv> system. I know such a beast exists for PERL but I don't think one does
mv> for ksh.

There's a debugger for bash, but you have to build it. Look on
SourceForge.

Not ksh though.

Remember you can use "set -x" to get the shell to print the commands its
running, which can be extremely helpful although it doesn't let you
single-step.

--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@nortel.com> HASMAT--HA Software Mthds & Tools
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
These are my opinions--Nortel takes no responsibility for them.
libdave@gmail.com

2006-01-19, 6:24 pm

http://bashdb.sourceforge.net/

here be the link for the bash debugger

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com