Hello!
I am dropping this mail to bring up an issue which cost me three good
evenings of time. Now that i figured it out i believe it is quite a
serious usability problem.
Gist of the problem: i have some C++ code wrapped with SWIG, so a native
extension. As with all software - there was a bug. However, no matter
what i did - i could not debug it in a native debugger. I ran
".venv/Scripts/python.exe script.py" in a native debugger and
breakpoints would not be hit, application would crash eventually. This
was especially confusing, because exact same setup worked just fine on
linux. I eventually stumbled on to process list showing
".venv/Scripts/python.exe" having spawned a subprocess... Which led me
to "PC/launcher.c" which is what ".venv/Scripts/python.exe" really is. I
cant find much information about this behavior in documentation even
after the fact. All in all, this was quite confusing. So now every time
i want to debug a native extension i have to start a program and then
attach a debugger to it, instead of just hitting "Debug" button in IDE.
It gets worse if crash happens immediately, which means i have to resort
to things like adding a message box somewhere to block execution and
give me enough time to attach the debugger. It works in the end, but
user experience is really not great. But whats worse - this is such a
non-obvious behavior that many more people may trip on it and waste
their time. Documenting this behavior would be of little help too, as
there is no clear path from the issue to the documentation on the matter...
So there it is. I am sure it is the way it is for a good reason.
However, this is a very error-prone process which is likely to waste
people's time. So maybe this behavior could be reconsidered? Or maybe
there is a solution already, which escaped me?
--
-- Rokas Kupstys
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/2BHNPL7DHLPRQYMN7FQBJQRZ6H6SDIVE/
Code of Conduct: http://python.org/psf/codeofconduct/
I am dropping this mail to bring up an issue which cost me three good
evenings of time. Now that i figured it out i believe it is quite a
serious usability problem.
Gist of the problem: i have some C++ code wrapped with SWIG, so a native
extension. As with all software - there was a bug. However, no matter
what i did - i could not debug it in a native debugger. I ran
".venv/Scripts/python.exe script.py" in a native debugger and
breakpoints would not be hit, application would crash eventually. This
was especially confusing, because exact same setup worked just fine on
linux. I eventually stumbled on to process list showing
".venv/Scripts/python.exe" having spawned a subprocess... Which led me
to "PC/launcher.c" which is what ".venv/Scripts/python.exe" really is. I
cant find much information about this behavior in documentation even
after the fact. All in all, this was quite confusing. So now every time
i want to debug a native extension i have to start a program and then
attach a debugger to it, instead of just hitting "Debug" button in IDE.
It gets worse if crash happens immediately, which means i have to resort
to things like adding a message box somewhere to block execution and
give me enough time to attach the debugger. It works in the end, but
user experience is really not great. But whats worse - this is such a
non-obvious behavior that many more people may trip on it and waste
their time. Documenting this behavior would be of little help too, as
there is no clear path from the issue to the documentation on the matter...
So there it is. I am sure it is the way it is for a good reason.
However, this is a very error-prone process which is likely to waste
people's time. So maybe this behavior could be reconsidered? Or maybe
there is a solution already, which escaped me?
--
-- Rokas Kupstys
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/2BHNPL7DHLPRQYMN7FQBJQRZ6H6SDIVE/
Code of Conduct: http://python.org/psf/codeofconduct/