Directly finish the debugger when program ends if the
debugger is in running state as this feels more natural.
Only get into post-mortem handling when stepping.
Change-Id: I6ac6600a7cb8f58a003a6e4783174864ed5e89d8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Explicitly use str(), type() and similar from builtins
to avoid confusing the the debugger when these builtin
functions are overwritten by the script which is going
to get debugged.
Fixes: QTCREATORBUG-28733
Change-Id: I6b7bd1d7474972d0533d12a1bc45bb59db7f39b5
Reviewed-by: hjk <hjk@qt.io>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
generated with autopep8 and the introduced setup.cfg
Change-Id: I5b55a7937f2cde81be59d2b434e94ada1a4af5ab
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
..instead of trying to start over. Starting over may work
but may also end up in strange issues which must get
handled on the user site otherwise.
Especially relevant for pyside projects that are using
QApplication and similar where the old application
instance has to be destroyed before another one can be
created.
Change-Id: I6af132da8499ef4ed983491cdc423fa73ea9ba32
Reviewed-by: hjk <hjk@qt.io>
When a script used __file__ to refer to other
files by constructing relative paths it ended
up trying to use a file relative to the pdbbridge
instead the original python file.
Fix this by bringing the bridge closer to the
original pdb code.
Change-Id: I22dda440c78349bfd3dcf4ce748042cc77eb4bee
Reviewed-by: hjk <hjk@qt.io>
Rename internally used classes and suppress them
explicitly while debugging python code to not display
them on the Locals and Expressions.
Change-Id: Ia396243172b2d138c9f4c81b2f1ed0fec0dce3d3
Reviewed-by: hjk <hjk@qt.io>
When parsing the file path of location information the
GdbMi parser expects UNIX-style formatted paths.
When debugging with the pdb on Windows we reported
Windows-style paths which in turn made the parser fail
and the stack never contained a file name and the
current location also had never a marker displayed.
Change-Id: I5216bbaf39ceead63efe8426561f132de3cd04a2
Reviewed-by: hjk <hjk@qt.io>
It doesn't seem to be needed anymore, and if it were, it'd be the
task of the back-end specific fromNativeType() functions to sanitize
type names.
Change-Id: I7c6af40aeacb2dbaaf73143e9fdcc1d866bf3f3d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Update license of files loaded in debugger
* Make sure all files have a license header
Change-Id: I612885652bcae0a4b7a88ae5184ef661aee25006
Reviewed-by: hjk <hjk@theqtcompany.com>
... into a string specifying a kind of encoding (utf8, latin1),
an optional bytesize (2-byte integers, 4-byte integers) and a
flag whether the displayed value should get "..." around it.
Scales better than adding an enum value for each new combination.
Change-Id: Iffcb1e2f148f12da96e165559a976bd34026c649
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Values are passed through plain str(eval(...)), i.e. no expansion
of non-scalars (list, dict, ...) yet.
Change-Id: I21ceab29504e2bb43aef516f9beeca5470500fdc
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... for non-builtins. Split the "<foo instance at 0xdeadbeef>" into
a value "@0xdeadbeef" and a type "foo".
Change-Id: I7cdc83c34c064cc48b88d549157b07268f020225
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... by more direct flushing on the dumper side.
Change-Id: I53d91e564bb948e3c934242fec4f23f36ee8c10e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Starting from unused command line commands like
'up' and 'down' up to the (Pdb) prompt handling.
Change-Id: I93ab5025a52b259e3f9d80f3251e88bdb18a3467
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The (re-)enables basic stepping, data display, frame selection etc
for Python 2 and 3. Arguments passing, jump to line etc.
don't work yet.
Change-Id: I8af03e5905092360eb268ba3081a1236b1f8577f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
That's still not meant for "production", but just the "3rd use case
needed to get abstractions right".
For testing, remove all build steps, and use a custom run step
with executable /usr/bin/python and argument pointing to the
main .py file.
Change-Id: I6ae6ed08597896ea979ee58e73c546c7892e8be2
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>