Bash Debug Problem
Closed this issue · 5 comments
We have written the needed data into your clipboard because it was too large to send. Please paste. when I try to perform a debug of code
for i in *.pdb;
do
echo ${i::-3}
prepare_ligand4.py -l $i -A hydrogens
cp config.txt ${i::-4}"dock.txt"
sed -i 's/TOCHANGE/'${i::-4}'/g' ${i::-4}"dock.txt"
#vina --cpu 8 --config ${i::-4}"dock.txt"
done
and cannot launch program setting the 'outfiles' attribute might help appears
Then I add
#!/usr/bin/env node
for i in *.pdb;
do
echo ${i::-3}
prepare_ligand4.py -l $i -A hydrogens
cp config.txt ${i::-4}"dock.txt"
sed -i 's/TOCHANGE/'${i::-4}'/g' ${i::-4}"dock.txt"
#vina --cpu 8 --config ${i::-4}"dock.txt"
done
debug execute but give me this error
/home/david/Scripts/Docking/VINA/AutoVINA.sh:3
for i in *.pdb;
^
SyntaxError: Unexpected identifier
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:656:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
CPUs | Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz (4 x 2700)
GPU Status | 2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: disabled_softwareskia_renderer: disabled_off_okvideo_decode: unavailable_offviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled
Load (avg) | 4, 4, 3
Memory (System) | 15.53GB (0.97GB free)
Process Argv | AutoVINA.sh --no-sandbox
Screen Reader | no
VM
Extension | Author (truncated) | Version |
---|---|---|
shell-format | fox | 7.0.1 |
bash-extension-pack | liz | 0.0.4 |
bash-ide-vscode | mad | 1.8.0 |
python | ms- | 2020.3.71659 |
powershell | ms- | 2020.3.0 |
autodocstring | njp | 0.4.0 |
shellman | Rem | 4.4.0 |
bash-debug | rog | 0.3.7 |
shebang-snippets | rpi | 0.1.4 |
bash-beautify | sha | 0.1.1 |
Thank you for your time and consideration
Not sure what is the issue here, but please try using proper shebang for bash.
The error stack indicates that shell script is interpreted by nodejs...
using #!/bin/sh
this message appears
my launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${file}"
}
]
}
Please notice, that you are using node debugger extension in launch.Json. You need to create bash config to debug shell script.
Hi.
thank you for your quick answer. I am new in vscode and I do not understand how to create this bash config. Any recommendation?