From: Nathaniel Talbott Date: 2002-03-27T03:29:10+09:00 Subject: RE: test::unit debugging and profiling Thomas Sondergaard [mailto:tsondergaard@speakanet.com] wrote: > For some reason I can't debug and profile my ruby-unit-style > unit tests with test::unit. I run them like this: > > ruby -r profile mytestsuite.rb > > ruby -r debug mytestsuite.rb > > But the debugger doesn't stop at breakpoints and the profiler > doesn't profile all the code - certainly not the production > code being exercised in the test suite. > > Any ideas as to why this is? The issue is that trace functions are removed before #at_exit blocks are called. Thus, if you use automatic running, the profiler and debugger are no longer registered by the time your tests are run. I have a fix in CVS for debugging; profiling support is now in the TODO. Until there's a release that supports both, you can get things to work by bypassing automatic running and doing things the old way (i.e. creating a suite yourself and passing it to one of the runners). Nathaniel <:((>< + - - | RoleModel Software, Inc. | EQUIP VI