Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Debugging Tip
Topic Summary:
Created On: 11-May-2006 15:12
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 11-May-2006 15:12
User is offline View Users Profile Print this message


Richard Good

Posts: 152
Joined: 22-Mar-2005

A neat undocumented debugging trick for DOORS 8.

put the following above the code you want to debug:-
startDXLTracing_("C:\\Your Dir\\Your File.txt")

and the following beneath the code to be debugged: -

stopDXLTracing_

Run the code and open the file you've created, made my life a little bit easier, might make yours easier to?

-------------------------
Regards,

Richard Good
Report this to a Moderator Report this to a Moderator
 11-May-2006 16:17
User is offline View Users Profile Print this message


cliff Bly

Posts: 58
Joined: 11-Apr-2003

Works for version 7.1 as well. I don't understand the exact syntax but it is useful for seeing what happens in loops without having to put print statements, etc.

-------------------------
Cliff Bly
Report this to a Moderator Report this to a Moderator
 12-May-2006 23:00
User is offline View Users Profile Print this message


Shawn Stepper

Posts: 96
Joined: 6-Aug-2004

This is great! So now that we can generate a trace, does anyone know of a tool to aid in analyzing the trace?

Thanks!

-------------------------
Shawn Stepper
shawn.e.stepper@wellsfargo.com
Report this to a Moderator Report this to a Moderator
 15-May-2006 20:01
User is offline View Users Profile Print this message


Richard Good

Posts: 152
Joined: 22-Mar-2005

A few more tricks if anyones interested, not as useful as the "dxl Tracing" one though

1) Output a profile (gives you a list of the number of calls to various functions between the profile being switched on and switched off

profile_(true)
//do somthing
profile_(false)
printProfile_("c:\\Temp\\Tempprofile.txt")

2) Write your own debugging routine (can't figure out a good use for this one): -

void MyDebugger(string TheFile, int TheLine) {
print TheFile "\t" TheLine "\n"
}

setDebugCallback_(MyDebugger)
setDebugging_(on)
//do somthing
setDebugging_(off)

3) dxl profiling, can't get this one to work, perhaps Telelogic haven't implemented it or I'm missing somthing

startDXLProfiling_("C:\\temp\\profile2.txt")
//do somthing
stopDXLProfiling_

-------------------------
Regards,

Richard Good
Report this to a Moderator Report this to a Moderator
 15-May-2006 21:53
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

I merged these calls desribed by Shawn into a single Debugging script.

Have no idea what the Profiling was about; but the two methods (#2 and #4) produce reports of the same format, but the ProfileTracingLog produces the same result each time; whereas the DXLProfiling report gets odds bigger each time; must be some sort of accumulation.

Strategy [1] (DXLTracing) seems to be the only one worth anything. Looks like its the value of variables at each line when they are used, and the value of they are set with an = sign.

- Louie
Report this to a Moderator Report this to a Moderator
 17-May-2006 14:09
User is offline View Users Profile Print this message


Richard Good

Posts: 152
Joined: 22-Mar-2005

The DXLTracing is very useful for seeing whats going on in loops as Cliff says, and I'm sure its saved me debugging time already.

I found the "dxltracing_" thing by accident, I was actually looking for a way to find out how long a program spent in each function so as to optimise the bottlenecks, thats what I understood profiling to be. Couldn't figure out a way to do this sensibly, although thats not to say there isn't a way. I know I can add code to time each suspect function but don't really want to go to this much trouble. I need to do somthing in "MyDebugger" to identify a line with a function so I can time each function. Any suggestions would be welcome. It's definately an interesting aside, if anyone finds out any more on this subject can you please post the results to this thread.

-------------------------
Regards,

Richard Good
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.