PyWin Debugger は、Python のデバッグ機能を使用して、Softimage 内で実行されているスクリプトをデバッグできるインタラクティブな GUI です。 この定義モジュールは、pdb モジュール(標準的な Python デバッガ)上でビルドされる debugger です。

PyWin Debugger には、スクリプトのデバッグを支援する、次のようなデバッグ ツールが用意されています。
推奨されている pywin32 拡張モジュールを使用している場合、PyWin Debugge rはすでにインストールされていて、呼び出す準備ができています。 このデバッガは Python モジュールであるため、使用する前に読み込んでおく必要があります。
# This loads the debugger module... import pywin.debugger as dbg # This launches the GUI: dbg.brk()
dbg.set_trace()
PyWin Debugger は Softimage と直接対話するため、インタラクティブなウィンドウ内にコマンドを入力して Softimage を制御できます。 たとえば、デバッガのインタラクティブなウィンドウ内で「Application.LogMessage("Debug this!")」と入力して[Enter]キーを押すと、Softimage のヒストリ ペインに「"Debug this!"」とログが記録されます。
PyWin Debugger のインタラクティブなウィンドウを修正し、オートコンプリート プロンプトで Softimage オブジェクトが自身のすべてのメソッドを表示するように設定できます。
%PythonPath%\Lib\site-packages\pythonwin\pywin\scintilla\view.py ファイルを編集し、_AutoComplete 関数内に以下の行を追加します(コンテキスト行を使用してコードを挿入する場所を見つけます)。
# The object may be a COM object with typelib support - lets see if we can get its props.
# (contributed by Stefan Migowsky)
try:
# Get the automation attributes
items_dict.update(ob.__class__._prop_map_get_)
# See if there is an write only property
# could be optimized
items_dict.update(ob.__class__._prop_map_put_)
# append to the already evaluated list
except AttributeError:
pass
# BEGIN ADDED LINES
# The object might be a pure COM dynamic dispatch with typelib support - lets see if we can get its props.
if hasattr(ob, "_oleobj_"):
try:
for iTI in xrange(0,ob._oleobj_.GetTypeInfoCount()):
typeInfo = ob._oleobj_.GetTypeInfo(iTI)
typeAttr = typeInfo.GetTypeAttr()
for iFun in xrange(0,typeAttr.cFuncs):
funDesc = typeInfo.GetFuncDesc(iFun)
funName = typeInfo.GetNames(funDesc.memid)[0]
if not items_dict.has_key(funName):
items_dict[funName] = 1
except:
pass
# END ADDED LINES
except:
win32ui.SetStatusText("Error attempting to get object attributes - %s" % ('sys.exc_info()[0]',))