Java\Python\InteliJ: Is there a way to debug a python script called from java code?

Viewed 77

I have 2 projects: A maven based java project and a python project.

From the Java code I have a call to some py file in the python project.

I call it using a shell process creation. The command is something like this:

cmd /c "cd /d c:\Users\username\gitwork\lre-events\venv\Scripts & activate & cd /d    c:\Users\username\gitwork\lre-events & python filename.py

To debug the python script I would halt the java execution right before calling this command, and then move to PyCharm and execute the command using debug configuration with the relevant arguments values.

My question is whether there is a seamless way to step into the python code from within IntelliJ directly when I call the python script?

I already installed the Python plugin in IntelliJ and imported the python project into it.

But I probably do not understand how to create the dependency and how to make the call so I will step into the python code for debugging.

Is Jython a valid option? (Update: maybe - but anyways not for me since I am using JDK 15 and Python 3.9)

Thanks.

0 Answers
Related