manim icon indicating copy to clipboard operation
manim copied to clipboard

Is there anyway to debug classes made with manim?

Open Ammar34 opened this issue 5 years ago • 7 comments

If this is a support request:

Please attempt to solve the problem on your own before opening an issue. Between old issues, StackOverflow, and Google, you should be able to find solutions to most of the common problems.

Include at least:

  1. Steps to reproduce the issue (e.g. the command you ran)
  2. The unexpected behavior that occurred (e.g. error messages or screenshots)
  3. The environment (e.g. operating system and version of manim)

If this is a feature request:

Include the motivation for making this change.

Ammar34 avatar Apr 14 '20 12:04 Ammar34

Depends on what you mean by debug, I guess.

kilacoda avatar Apr 15 '20 10:04 kilacoda

If your demand is to debug your code which use manim library to generate video file, refer to below page. It explains the way of debugging with PyCham program for the code using manim library.

https://p14jeffwest.blogspot.com/2020/04/how-to-debug-manim-code-with-pycham.html

Briefly speaking, the idea is changing run command without -m option in the PyChan Run/Debuf Configuration as below:

python manim.py sample_code.py SampleClass -pl

In the above web page, I explained how to set Configuration for debugging in PyCham with several screen shot. Therefore you can easily follow the guide.

p14jeffwest avatar Apr 15 '20 14:04 p14jeffwest

Depends on what you mean by debug, I guess.

What i mean by debugging is to see if there are any bugs in the code and it is behaving as is expected - the variables are getting the values they are supposed to, etc

Ammar34 avatar Apr 15 '20 14:04 Ammar34

If your demand is to debug your code which use manim library to generate video file, refer to below page. It explains the way of debugging with PyCham program for the code using manim library.

https://p14jeffwest.blogspot.com/2020/04/how-to-debug-manim-code-with-pycham.html

Briefly speaking, the idea is changing run command without -m option in the PyChan Run/Debuf Configuration as below:

python manim.py sample_code.py SampleClass -pl

In the above web page, I explained how to set Configuration for debugging in PyCham with several screen shot. Therefore you can easily follow the guide.

I will try pyCharm but i am using VS Code and I like it quite much.

Ammar34 avatar Apr 15 '20 14:04 Ammar34

You could always try using pdb for most debugging purposes by the way. Just import pdb and then pdb.set_trace(). I'd suggest reading into it even for general Python debugging.

kilacoda avatar Apr 15 '20 17:04 kilacoda

You could always try using pdb for most debugging purposes by the way. Just import pdb and then pdb.set_trace(). I'd suggest reading into it even for general Python debugging.

This is good advice. Thanks

Ammar34 avatar Apr 15 '20 21:04 Ammar34

#894 <- Read my way around here.

adhxtry avatar Dec 03 '21 14:12 adhxtry