Critical: Debug the python script that is invoked by shell script
There is shell script file with example.sh, which invokes python file in it. I need to debug the python file(new_file.py).
When I set the breakpoints in python file and run the shell script(which calls new_file.py file), the debugger doesn't work, instead it executes the whole python file without stopping at breakpoints. Any solution to debug?

Please sign in to leave a comment.
Any update please?
Hi Laxmitg1994, please try to create a separate run configuration for
newfile.pyand debug this python file explicitly. Would it help?Mikhail Tarabrikov No. I have a separate code with the above setup. I need to run shell script first and then it invokes python file. So I need a way to debug the python code. Can you give me possible solutions?
Any update on the solution?
Laxmitg1994 , apologies for the delay. You can try Python debug server configuration then:
0. Start Python Debug Server configuration which will wait for connections
1. Install
pydevd-pycharmin the interpreter used to runnewfile.py2. Inside
newfile.pyadd(adjust port as deeded)
3. Start
example.shwhich will callnewfile.pyand connect to debug server and then pause on breakpoint