How to trace through makehuman source?

If your topic doesn't fit anywhere else, put it here.

Moderator: joepal

How to trace through makehuman source?

Postby chris.f.rice » Wed Feb 16, 2022 3:00 pm

Hello, I'm a software developer, although new at python, trying to understand how makehuman works. I've followed the instructions at (1) below, and the command line entry

py makehuman.py

works great, it runs fine. But I'm trying to understand what code is run when I move a slider, so I'm looking for a way to trace through. I run this:

python -m trace --trace makehuman.py

and it runs the program, and starts printing the called functions, which is *perfect* except it stops after a few seconds (while the program keeps running). Perhaps it overwhelms the console window?

Then I run this, which is supposed to save trace information to the local folder

python -m trace --count -C . makehuman.py ...

However, *no* new files are created, I'm not sure why -- is there some way that makehuman is not traceable? So, I'm stuck right now on how to trace things. Can anyone provide any insight into what I'm doing wrong above, or maybe if someone has a better way to trace through the makehuman code as it runs?

Thanks *very* much.




1) https://github.com/makehumancommunity/m ... /README.md
chris.f.rice
 
Posts: 4
Joined: Wed Feb 16, 2022 2:48 pm

Re: How to trace through makehuman source?

Postby Aranuvir » Mon Feb 21, 2022 12:37 am

Interesting approach to inspect MakeHuman's functionality. I didn't know about this before. Since the trace result is written to stdout, it is possible to simply redirect the stream to a text file.
A quick test run for about 1.5 minutes resulted in a 1.3 GB file, and MakeHuman did not even fully start. I assume that's less suitable to get to know the code.

Maybe the classical way by using an IDE like Pycharm CE and digging through the code might be more helpful...
Aranuvir
 
Posts: 1314
Joined: Sun Oct 12, 2014 2:12 pm

Re: How to trace through makehuman source?

Postby RobBaer » Tue Feb 22, 2022 1:17 pm

I think Aranuvir has it just right in terms of making progress. It seems to me that your approach is useful for programs that are constructed linearly. However, the MakeHuman GUI is based on Qt library, and so much of the time in MakeHuman is spent in event loops.

In order to trace things effectively, I suspect you will want the chance to dynamically set and reset break points. Tools like Pycharm CE or MS Visual Code might be more useful than your command line approach.
User avatar
RobBaer
 
Posts: 1208
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA

Re: How to trace through makehuman source?

Postby leslietylees » Fri Nov 04, 2022 2:37 am

I think your method works well for programs that are built in a linear wayoctordle But the MakeHuman GUI is built on the Qt library, so a lot of time is spent in event loops.
leslietylees
 
Posts: 5
Joined: Fri Nov 04, 2022 2:33 am


Return to General discussions about makehuman

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron