Python model debugging #1195
-
Hi there! :) This question is similar to #884. When debuging agent-python..
When trying to debug a model written in agent-python using a debug build with
I can see some NvDebugAgent running for a while until it stops.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
See @mondus's comment below
How many agents are in the model you are debugging? CUDA debugging and profiling can be very slow. I see no reason why if your code runs outside the debugger it would fail to run with that particular workflow. @ptheywood is more accomplished with gdb, but he's unavailable till next week. |
Beta Was this translation helpful? Give feedback.
Just to follow up.
Actually yes. #884 Gives an example of how to call
printf
from Python. You will need to useprintf
rather thanprint
and treat the arguments as they would be used in C/C++. E.g. provide a string fomratted and the subsequent arguments. This will produce a compilation warning. E.g. "Function call is not a defined FLAME GPU device function or a supported python built in.".Perhaps a better way is to store the value you want to debug in an agent variable and then either in a step or exit function obtain the agent population so you can examine each of the agent variables.
Not sure why your debugging process is not working …