BashEclipse Debuging Steps 1) Select Debut perspective 2) Right click on your script. Navigate to Debug Configurations. 3) Select Bash Script... click the icon to create a new configuration (if you already have one click on the current one). 4) Give the configuration a name. Click Browse to find the script. Ensure the port is 33333. 5) Click Debug. 6) Right Click your script again, then Select "Run As" ... Click "Run Shell Script". 7) You may have to click on a button to browse to find your script for the debugger. You're in. Use the normal Debugger options from the debug perspective. 8) You can easily restart your script from the debug menu by right clicking on the script name in the "Debug" window and clicking the "Terminate and Relaunch" option. Then continue from step #6. Step 8 is handy for starting the launch after making changes to your script. There are many short cuts that can be taken. If you run into problems, being careful to perform the steps above is a way to ensure getting a proper start.
Greetings to Community.
I tried to apply BashEclipse to debugging of shell-scripts.
But it something wrong either in my setup or in my settings.
BashEclipse installed manually in full accordance with the creator's readme.txt, i.e.
both *.jars copied to 'eclipse/plugins/' (really to 'eclipse/dropins/' first, but later and in 'eclipse/plugins/' also)
and they are visible in Help|Installation details|Plugins, as well as Shelled's ones.
BTW, ShellEd installed throuth Help|Install New Software , Eclipse didn't scold.
In "Installed Software" ShellEd appears, BashEclipse - no.
I open created test.sh (with wtitten '. ./_DEBUG.sh at begin and, of course, with file _DEBUG.sh in test.sh's folder)
and can run it only, can't debug. In the Debug|Debug As| is one subpiont - grayed "(none applicable)".
After 'Run As|Run Shell Script' script works, but say in console first
./_DEBUG.sh: connect: Connection refused
./_DEBUG.sh: line 1: /dev/tcp/localhost/33333: Connection refused
and after every script line
./_DEBUG.sh: line 5: read: 33: invalid file descriptor: Bad file descriptor
./_DEBUG.sh: line 5: read: 33: invalid file descriptor: Bad file descriptor
...
In Debug Configurations|Bash script|config are defined path to script and debug port (33333).
The file '_DEBUG.sh' consist of
# ==========================================
exec 33<>/dev/tcp/localhost/33333
function _________DEBUG_TRAP ()
{
local _________DEBUG_COMMANDDebug a Bash script
read -u 33 _________DEBUG_COMMAND
eval $_________DEBUG_COMMAND
}
set -o functrace
trap _________DEBUG_TRAP DEBUG
# ==========================================
In my Slackware 14.0 absent /dev/tcp/localhost/33333 and even /dev/tcp.
'nmap localhost'shows
PORT STATE SERVICE
37/tcp open time
113/tcp open ident
6000/tcp open X11
8080/tcp open http-proxy
8081/tcp open blackice-icecap
And
bash-4.2# grep -r 33333
Binary configuration/org.eclipse.osgi/816/0/.cp/splash.bmp matches
Binary configuration/org.eclipse.osgi/283/0/.cp/org/eclipse/epp/internal/mpc/ui/wizards/RatingTooltip.class matches
Binary plugins/org.eclipse.jst.jsf.facesconfig_1.5.0.v201309172102.jar matches
Binary plugins/org.eclipse.jst.ws.cxf.doc.user_1.0.300.v201309232209.jar matches
Binary plugins/org.eclipse.wst.wsdl_1.2.350.v201309242123.jar matches
Binary plugins/org.eclipse.jst.j2ee.core_1.3.100.v201404161520.jar matches
Binary plugins/org.apache.lucene.analysis_3.5.0.v20120725-1805.jar matches
plugins/org.eclipse.ui.intro.universal_3.2.701.v20150204-1123/themes/slate/html/root.css: color:#333333;
plugins/org.eclipse.ui.intro.universal_3.2.701.v20150204-1123/themes/slate/html/shared.css: color:#333333;
plugins/org.eclipse.ui.intro.universal_3.2.701.v20150204-1123/themes/circles/html/shared.css: color:#333333;
Binary plugins/org.eclipse.datatools.sqltools.parsers.sql.query_1.2.1.v201201250511.jar matches
Binary plugins/org.eclipse.egit.doc_3.4.2.201412180340-r.jar matches
Binary plugins/org.eclipse.dstore.core_3.4.0.201411132153.jar matches
To speak shortly (in grep if trust), that ^ *.jar & *.css doesn't contain 'localhost', 'tcp', 'DEBUG_TRAP' and so on...
Exept
bash-4.2# grep -r localhost
Binary configuration/org.eclipse.core.runtime/.extraData.4 matches
readme/readme_eclipse.html: "127.0.0.1;localhost" to the "Exceptions" if these
It looks like Eclipse miss come component which must to create /dev/tcp/localhost...
Eclipse Java EE IDE for Web Developers. Version: Luna Service Release 2 (4.4.2). Build id: 20150219-0600.
Humans in a net responds about BasheClipse and ShellEd only positively.
So I guess troublem is really some simple, but my Eclipse configuration expiriense absent at all. ;(
Can somebody give advise? If not settle, then at least direction where to dig...
On the BashEclipse author's site is not help or forum, and last time appearence in his blogs is may 2012,
so the hope for his emergence there is small. Mail is also unavaliable...
I don't know if you every found a resolution to your problems, but studying in details your output, the solution is simple.
The steps in the documents might not be totally clear. But if followed close enough, it'll work.
You'll get the console errors you posted, if you run the _DEBUG file outside of the launched debug environment.
There are other problems that could happen when trying to launch debug, that includes complaints that it's already running.
Try these steps:
BashEclipse Debuging Steps 1) Select Debut perspective 2) Right click on your script. Navigate to Debug Configurations. 3) Select Bash Script... click the icon to create a new configuration (if you already have one click on the current one). 4) Give the configuration a name. Click Browse to find the script. Ensure the port is 33333. 5) Click Debug. 6) Right Click your script again, then Select "Run As" ... Click "Run Shell Script". 7) You may have to click on a button to browse to find your script for the debugger. You're in. Use the normal Debugger options from the debug perspective. 8) You can easily restart your script from the debug menu by right clicking on the script name in the "Debug" window and clicking the "Terminate and Relaunch" option. Then continue from step #6. Step 8 is handy for starting the launch after making changes to your script. There are many short cuts that can be taken. If you run into problems, being careful to perform the steps above is a way to ensure getting a proper start.
Also make sure your bash interpreter in the perspective configuration is bash and not dash.
Again, in your particular case to produce the error of your message you missed step #5 before you performed step #6.
-- L. James
--
L. D. James
ljames.apollo3.com
www.apollo3.com/~ljames
keresek valasz wrote on Fri, 05 June 2015 00:34Greetings to Community.
I tried to apply BashEclipse to debugging of shell-scripts.
But it something wrong either in my setup or in my settings.
BashEclipse installed manually in full accordance with the creator's readme.txt, i.e.
both *.jars copied to 'eclipse/plugins/' (really to 'eclipse/dropins/' first, but later and in 'eclipse/plugins/' also)
and they are visible in Help|Installation details|Plugins, as well as Shelled's ones.
BTW, ShellEd installed throuth Help|Install New Software , Eclipse didn't scold.
In "Installed Software" ShellEd appears, BashEclipse - no.
I open created test.sh (with wtitten '. ./_DEBUG.sh at begin and, of course, with file _DEBUG.sh in test.sh's folder)
and can run it only, can't debug. In the Debug|Debug As| is one subpiont - grayed "(none applicable)".
After 'Run As|Run Shell Script' script works, but say in console first
./_DEBUG.sh: connect: Connection refused
./_DEBUG.sh: line 1: /dev/tcp/localhost/33333: Connection refused
and after every script line
./_DEBUG.sh: line 5: read: 33: invalid file descriptor: Bad file descriptor
./_DEBUG.sh: line 5: read: 33: invalid file descriptor: Bad file descriptor
...
In Debug Configurations|Bash script|config are defined path to script and debug port (33333).
The file '_DEBUG.sh' consist of
# ==========================================
exec 33<>/dev/tcp/localhost/33333
function _________DEBUG_TRAP ()
{
local _________DEBUG_COMMANDDebug a Bash script
read -u 33 _________DEBUG_COMMAND
eval $_________DEBUG_COMMAND
}
set -o functrace
trap _________DEBUG_TRAP DEBUG
# ==========================================
In my Slackware 14.0 absent /dev/tcp/localhost/33333 and even /dev/tcp.
'nmap localhost'shows
PORT STATE SERVICE
37/tcp open time
113/tcp open ident
6000/tcp open X11
8080/tcp open http-proxy
8081/tcp open blackice-icecap
And
bash-4.2# grep -r 33333
Binary configuration/org.eclipse.osgi/816/0/.cp/splash.bmp matches
Binary configuration/org.eclipse.osgi/283/0/.cp/org/eclipse/epp/internal/mpc/ui/wizards/RatingTooltip.class matches
Binary plugins/org.eclipse.jst.jsf.facesconfig_1.5.0.v201309172102.jar matches
Binary plugins/org.eclipse.jst.ws.cxf.doc.user_1.0.300.v201309232209.jar matches
Binary plugins/org.eclipse.wst.wsdl_1.2.350.v201309242123.jar matches
Binary plugins/org.eclipse.jst.j2ee.core_1.3.100.v201404161520.jar matches
Binary plugins/org.apache.lucene.analysis_3.5.0.v20120725-1805.jar matches
plugins/org.eclipse.ui.intro.universal_3.2.701.v20150204-1123/themes/slate/html/root.css: color:#333333;
plugins/org.eclipse.ui.intro.universal_3.2.701.v20150204-1123/themes/slate/html/shared.css: color:#333333;
plugins/org.eclipse.ui.intro.universal_3.2.701.v20150204-1123/themes/circles/html/shared.css: color:#333333;
Binary plugins/org.eclipse.datatools.sqltools.parsers.sql.query_1.2.1.v201201250511.jar matches
Binary plugins/org.eclipse.egit.doc_3.4.2.201412180340-r.jar matches
Binary plugins/org.eclipse.dstore.core_3.4.0.201411132153.jar matches
To speak shortly (in grep if trust), that ^ *.jar & *.css doesn't contain 'localhost', 'tcp', 'DEBUG_TRAP' and so on...
Exept
bash-4.2# grep -r localhost
Binary configuration/org.eclipse.core.runtime/.extraData.4 matches
readme/readme_eclipse.html: "127.0.0.1;localhost" to the "Exceptions" if these
It looks like Eclipse miss come component which must to create /dev/tcp/localhost...
Eclipse Java EE IDE for Web Developers. Version: Luna Service Release 2 (4.4.2). Build id: 20150219-0600.
Humans in a net responds about BasheClipse and ShellEd only positively.
So I guess troublem is really some simple, but my Eclipse configuration expiriense absent at all. ;(
Can somebody give advise? If not settle, then at least direction where to dig...
On the BashEclipse author's site is not help or forum, and last time appearence in his blogs is may 2012,
so the hope for his emergence there is small. Mail is also unavaliable...