I have written a shell script, which will do some configurations first before launching a python program. (e.g., downloading the data, pip install some packages, setting environment variables, etc. Then the heavy work in done inside the python program (e.g., a Deep Learning training task). Now I want to debug the python program, (I'm okay with if I have to debug both the shell and python together). How should I modify the launch.json
file to accomplish this? Should I add some task.json items? I'm not familiar with the task topic yet.
Currently, I am doing this in a ugly workaround way. I commentted out the python train.py
statement in the shell script and run the shell script first. Then run the python scipt python train.py
alone in debug mode. I think this currently works in my simple situation, but appearenlyt if inside the shell script, we are doing something like temporarily modify the environment variables, etc. I can't separate these two steps. So I want to know if there is a more straightforward and decent way. Much appreciated.