[Qt-creator] Any plans to support python debugging?

André Hartmann aha_1980 at gmx.de
Mon Feb 6 19:16:27 CET 2023

Hi André,

thanks for the historical treatise.

It's quite interesting that the Python debugger is already 13 years old!

For my usage, I don't expect a 100% perfect product, so what we have now
is already on a high level.

There are however two bugs that make the debugger unusable for me:

* QTCREATORBUG-28733 (global Python strings)
* QTCREATORBUG-28734 (running in Terminal)

If these could be fixed then everything else is low priority because me
and my colleagues can start using the debugger. Until then there will
probably be no new bugreports from my side.

If you have patches I'm open to test them and give feedback.

Thanks again for the great product. Please keep up the good work!

Regards, André

Am 03.02.23 um 09:18 schrieb A. Pönitz:
> 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 [1],
>> 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.
>> Awesome!
>> 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.
>> Regards,
>> André
>> [1] 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 ;-}
> Andre'

More information about the Qt-creator mailing list