Register
RemedyBG»Forums»Debugging a python C extension dll really slow
erwin coumans
6 posts
Debugging a python C extension dll really slow
1 month, 2 weeks ago Edited by erwin coumans on April 6, 2020, 9:11 p.m.
I'm developing a python extension and like to debug the dll.

The main program would be c:\python35\python_d.exe and it loads this dll in some other folder (say d:\plugin\myplugin.dll with the myplugin.pdb next to it).

The 'working directory' would be yet another directory that contains the python script (e:\test.py).

Start debugging works, but when I hit Control/Break, the debugger becomes really slow.
The menus become totally unresponsive as if the debugger hits an infinite loop somewhere.

It is an open source plugin so I'm happy to explain how to reproduce.
189 posts / 1 project

None

Debugging a python C extension dll really slow
1 month, 2 weeks ago
Any additional information would be helpful: OS version, where to get python_d, the DLL, and test.py.

Thanks!
erwin coumans
6 posts
Debugging a python C extension dll really slow
1 month, 2 weeks ago Edited by erwin coumans on April 9, 2020, 6:29 p.m.
Trying to create a repro case. Now when opening python.exe using your debugger, the error is:


Will get back.
erwin coumans
6 posts
Debugging a python C extension dll really slow
1 month, 2 weeks ago Edited by erwin coumans on April 9, 2020, 6:45 p.m.
OK, reproduction case is here:
OS is Windows 10.

Download this 7z archive, and unpack, for example in c:\

[url=]https://drive.google.com/file/d/1...mUJ2jVN8GHqmJtqM/view?usp=sharing[/url]

Then set two environment variables system wide (not just using set) to this directory you just unpacked (see also screenshots below):

PYTHONHOME=c:\python35
PYTHONPATH=c:\python35

Then run your debugger, and select the following (see also screenshots below):

command = c:\python35\python35_d.exe
command arguments: humanoid_running.py
working directory = c:\python35\pybullet_repro

After start debugging, break it. It will be very slow (at least on my fast machines).





189 posts / 1 project

None

Debugging a python C extension dll really slow
1 month, 1 week ago
Erwin,

This will be fixed in the next patch release (0.3.0.4). Thanks for taking the time to put together the repro.

--
George