[Qt-creator] Any plans to support python debugging?
apoenitz at t-online.de
Fri Feb 3 09:18:44 CET 2023
On Mon, Jan 30, 2023 at 02:47:33PM +0100, André Hartmann wrote:
> Hi Christian,
> indeed it works. One requirement seems to be a .pyproject file ,
> containing your Python file. Then you get a debug and a run button.
> Very nice!
> My breakpoint was ignored first and the app stopped at the first line,
> but I then could run until the breakpoint. I could inspect the
> variables, step over instructions. Just what you expect from a debugger.
> Now my question: Is this an official feature? I.e. can I create
> bugreports when I discover small bugs? Also, there does not seem to be
> much documentation, I guess few people working with that feature therefore?
> Thanks for that wonderful IDE. I cannot imagine working with something else.
>  I've created an Empty Qt for Python Application as there was no
> "Python without Qt" app template, but that instantly worked when I
> replaced the main.py with my simple Python code.
Regarding the "officiality":
I added the python debugger during the "big debugger rewrite" in 2010
bacically only to have another example of setup that should be supported
at least conceptually to get the DebuggerEngine API right. Python/PDB
was chosen as it operated a bit differently then the C/C++ debuggers GDB
and CDB (LLDB came later) insofar that it runs "in process" of the
debuggee and the typesystem is different).
As it "happens to work", is small and is occasionally used there are
enough reasons to keep it around.
You have noticed that the integration in the project management system
(by .pyproject, previously .pyqtc) is clumsy. That's mainly due to the
lack of possibilities to do it better back then; and it also one of the
reasons that's not quite official and documented: I simply don't think
it's in a good enough shape to be worth spending time on that.
Having said that, times are changing. The project management side is
much more flexible nowadays, and on the debugger side I'll probably have
to look into the Debugger Adapter Protocol at some time, i.e. I expect
some activity in the general area towards the end of the year / Creator
~12 time frame. If there are bug reports for the python debugger
indicating interest and if there are possibly even people around to test
stuff I guess it should be possible to spend a few cycles on it ;-}
More information about the Qt-creator