开发者

Debugging SCons

I've written a rather complicated set of SCons scripts, and I have some errors I cannot find, for example intermediate files are removed or there are cyclic dependencies reported, and I want to know the reason. Unfort开发者_如何学Pythonunately, I don't see any means to get good verbose debugging output of what SCons is doing and where. For example, the option --taskmastertrace=FILE does not explain why my intermediate files were deleted. (EDIT: of course I can protect them using Precious, but those files are needed for another target and the build fails -- I just don't see why they are deleted. My current solution involves Precious, but it's not a real fix for the issue).

I'd like to get a trace of everything going on, including dependency changes, file creations and deletions, and other operations. Is there any way to enable such verbose logging? I'm a little stuck with my project currently.

Cheers, H.


Ok, I've solved the problem. It seems the reason was that a directory slipped into the list of targets, and directories create their own set of implicit dependencies. At least that's what I think, because after removing the directory the scripts work as expected. Can anyone clarify if my assumption is correct?

I still don't know exactly as to how debug SCons with more details, my solution was to add function decorators to /usr/lib/scons/SCons/Node/FS.py that dump function calls + arguments and return values.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜