tool to instrument code

Hi,

Is there a IDE or external tool that can help me add and remove custom 
"instrumentation"s to selected methods in a unit:

e.g
add a line to this method:

procedure TForm1.Method1;
begin
end;

such as:

procedure TForm1.Method1;
begin
  SendTrace(%UnitName%, %MethodName%);  // where the tool inserts the line 
and also resolves unitname and methodname
end;

Thanks
Rael
0
Rael
11/27/2008 6:42:01 PM
embarcadero.delphi.tools 5366 articles. 1 followers. Follow

7 Replies
309 Views

Similar Articles

[PageSpeed] 45

Rael,

The JCL does it based from a MAP file or a .jdbg file one of it expert 
can automatically generate.

The following functions from JclDebug.pas will give you this information 
with Level set to 0 (the module is the unit name):

function FileByLevel(const Level: Integer = 0): string;
function ModuleByLevel(const Level: Integer = 0): string;
function ProcByLevel(const Level: Integer = 0): string;
function LineByLevel(const Level: Integer = 0): Integer;

This function gives all the information in one call (faster):
function MapByLevel(const Level: Integer; var File_, Module_, Proc_: 
string; var Line_: Integer): Boolean;

- Florent
0
Florent
11/27/2008 7:52:09 PM
Hi Rael,

> Is there a IDE or external tool that can help me add and remove custom "instrumentation"s to selected methods in a unit:

ModelMaker can do this.
You import the uninstrumented code,
define the instrumentation code macros (which can include things like classname, methodname etc)
enable the "instrumentation" option for some methods and regenerate.
To remove instrumentation, disable the instrumentation option and regenerate again.

To help setting the instrumentation option in a large number of
classes/methods/units, there is an instrumentation add-in by Robert Leahey.

Gerrit Beuze
ModelMaker Tools
0
Gerrit
11/28/2008 8:27:18 AM
Hi Florent,

> The JCL does it based from a MAP file or a .jdbg file one of it expert
> can automatically generate.
>
> The following functions from JclDebug.pas will give you this information
> with Level set to 0 (the module is the unit name):
>
> function FileByLevel(const Level: Integer = 0): string;
> function ModuleByLevel(const Level: Integer = 0): string;
> function ProcByLevel(const Level: Integer = 0): string;
> function LineByLevel(const Level: Integer = 0): Integer;
>
> This function gives all the information in one call (faster):
> function MapByLevel(const Level: Integer; var File_, Module_, Proc_:
> string; var Line_: Integer): Boolean;
>

I don't quite see how I can use this to achieve the instrumentation. Can you 
elaborate abit on this?

Thanks
Rael
0
Rael
12/1/2008 12:32:12 AM
SendTrace(ModuleByLevel(0),ProcByLevel(0));

- Florent
0
Florent
12/1/2008 7:42:14 AM
Thanks, that's very useful,

Rael

"Florent OUCHET" <outchy@users.sourceforge.net> wrote in message 
news:49631@forums.codegear.com...
> SendTrace(ModuleByLevel(0),ProcByLevel(0));
>
> - Florent
0
Rael
12/1/2008 11:58:41 AM
In addition, when you set the level parameter to 1, you can get the 
information about the caller, each time this parameter is incremented, 
you can get information about the previous caller in the call stack.

- Florent
0
Florent
12/1/2008 7:46:02 PM
Raize CodeSite will do this for you, from within the IDE. Each method has a
checkbox, and you can do all or none.

/Matthew Jones/
0
Matthew
12/18/2008 5:11:24 PM
Reply:

Similar Artilces:

Tools, Tools, Tools
</quot> Couple useful things for IT admins out there. I've packaged up Werner and Feder's PoC scanner via py2exe here. You can now simply run: </end_quot> http://www.doxpara.com/ -- "Never drive faster than your ANGEL can fly" ...

DST Tool or No Tool?
Ok, Every download link I try and hit for the tool to adjust Daylight Savings time junk is broken. Is there a tool available right now or not? Thanks! The tool is available, but Novell's login process for downloading files seems to have problems today. Currently however the download seems to be working again: http://download.novell.com/Download?buildid=carEGqApMKo~ -- Marcel Cox http://support.novell.com/forums That is the link I've been trying to hit. get a NoSuchBuildException on it. Does this mean a new build is coming out? Or should I be looking s...

Where are the tools. Sql tools that is.
I just installed sql 2005 standard.  I got a legal copy of an iso for registered students from an msdn academic program (Yes!).  WHen I run setup it says disk 1 of 2 in the corner.  I have mine on one DVD and am never prompted for disk II during install.   I used the 'run sql natve client install wizard' and then installed 'server components, tools, books online and samples.' I've been using sql express at work with no problem.  I thought the process would be similar, install .net, sql and then mm studio for sql.  But I haven't...

I want to instrument firefox source code, what tool works well?
I am trying to capture the preference state of firefox and I want to print = out the preference hash table when firefox is running. I am not sure which = instrumentation tool works well for such purpose (currently I am looking at= "Pin" by Intel). If you have similar experience or have good suggestions, = please let leave responses below. Thanks! ...

ANN: FixInsight 2015.02upd1 is available
[FixInsight|http://sourceoddity.com/fixinsight/] is a static analyzer that automatically detects source code issues in your Delphi applications. Visit website to learn more http://sourceoddity.com/fixinsight/ What's new in 2015.02upd1 * Introduced new command line parameters: --defines and --output * Fixed exception on clicking "Cancel" in progress dialog * Fixed AV on running analysis when no project is selected * "Cannot load package 'FixInsight_xxx.' It contains unit 'MSXML2_TLB'..." issue fixed. * Improved rule W513 * Improved...

Tool
Hello: looking for a tool that will, in the background, monitor a mailbox and save new messages as a .txt file to a folder; sort off like runnung a script. Any suggestions? -- EBSR_PARAMEDIC ------------------------------------------------------------------------ On 11/2/2011 4:16 AM, EBSR PARAMEDIC wrote: > > Hello: > > looking for a tool that will, in the background, monitor a mailbox and > save new messages as a .txt file to a folder; sort off like runnung a > script. Any suggestions? > > Your goal doesn't make sense - messages consi...

ANN: FixInsight 2015.02upd1 is available
FixInsight is a static analyzer that automatically detects source code issues in your Delphi applications. Visit website to learn more http://sourceoddity.com/fixinsight/ What's new in 2015.02upd1 * Introduced new command line parameters: --defines and --output * Fixed exception on clicking "Cancel" in progress dialog * Fixed AV on running analysis when no project is selected * "Cannot load package 'FixInsight_xxx.' It contains unit 'MSXML2_TLB'..." issue fixed. * Improved rule W513 * Improved parser You are welcome to download...

tool
I' using powerbuilder 5 and 6. For each pbl, I have to know the tables and the columns used : is there a tool (possibly free) to obtain this information TIA Marco PBL Peeper's (see below) DB Column Usage report does this. You can either select only one PBL to process against, select your entire application and then filter the results based on PBL, or export your results and the datawindow syntax and load them into the datawindow painter and do your own grouping. The CharityWare conditions of usage are available on the web site. Good luck, Terry [TeamSybase] and...

Code coverage take 2, and other code hygiene tools
Decoder and Jcranmer got code coverage working on Try[1]. They'd like to expand this into something that runs automatically, generating results over time so that we can actually know what our code coverage status is with our major run-on-checkin test harnesses. While both Joduinn and I are happy to turn this on, we have been down this road before. We got code coverage stood up in 2008, ran it for a while, but when it became unusable and fell apart, we were left with no options but to turn it off. Now, Jcranmer and Decoder's work is of far higher quality than that old ...

Static code analysis tool for C++Builder code?
Are there any static code analysis tools that work with C++Builder VCL C++ code? <Vincent Leonty> wrote in message news:243736@forums.embarcadero.com... > Are there any static code analysis tools that work with C++Builder VCL C++ > code? You mean like PC-Lint? PC-Lint has partial support for C++Builder code (the main issue is __property). However, PC-Lint does not, by itself, support C++Builder project files, so to analyze a project, you must create a response file for your project. This is a major undertaking, and for large projects, it is not one I would recomm...

code analysis tool to check the aspx.cs code?
Hi.. Is there any code analysis tool to check the aspx.cs codes? A tool which monitors the performance and check if the .cs code is inline with the .NET guidelines? Thanks. Hi,you may try this, though u have to purchase license.http://www.red-gate.com/products/ants_profiler/index.htmMehedi HasanMark as answer if the post meets your requirement! There is also dotTrace from JetBRAINS, but it is not free.http://www.jetbrains.com/profiler/ A free solution is CLR Profiler 2.0; however, I don't know if it will analyze ASP.NET apps. You can take a look at the following link and ...

ANN: wxForms for Delphi
We are pleased to announce the release of our wxWidgets Form Designer for Delphi - wxForms for Delphi 1.1. wxForms for Delphi is an integrated form designer plugin for Borland /CodeGear Delphi that helps to create cross platform applications for Windows, Mac OSX and Linux using single source base. The wxForms code from Delphi can be compiled in Mac OSX and Linux without much change using FreePascal. wxForms for Delphi allows you to use all the Delphi's powerful Form Designer/ Editor features (Form Alignment, Object inspector, Component Palette etc ) to quickly create Cross platfor...

Tools
Name: J Mangas Email: jmangas(at)dejazzddotcom Product: Minefield Summary: Tools Comments: The clear private data button does not function. I think Opera might do the best job at this function, at least so far. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20061205 Minefield/3.0a1 Remember that Minefield is not general release or to my knowledge even really in Alpha test yet. I will try and confirm/deny what you have discovered though. J Mangas wrote: > Name: J Mangas > Email: jmangas(at)dejazzddotcom > Product:...

tools
http://www.idera.com/ is only for SQL Server, are their any similar one's for SQL Anywhere/ASA9? In all honesty, tools like Idera exist for SQLServer because that database can't diagnose and fix its own problems. All of the features that the Idera tool provides are built right into SQLAnywhere. OK, maybe with the exception of "assess security risks" and "diagnose performance problems from your PDA"... Was there a specific feature that you were looking for? Paul Horan[TeamSybase] "Robert" <robert@_No_Spam.Com> wrote in me...

Web resources about - tool to instrument code - embarcadero.delphi.tools

Experimental musical instrument - Wikipedia, the free encyclopedia
... modifications, such as cracked drum cymbals or metal objects inserted between piano strings in a prepared piano . Some experimental instruments ...

Blunt Instrument: Malcolm Turnbull's ideas idea not a moment too soon
Malcolm Turnbull had an idea once. Along with some other guys, he helped turn it into a company called Ozemail and trousered a shedload of the ...


- One-man band brings homemade instruments, humor to Volcanic Theatre Pub
The Magic Pipe set the mood Monday night at Volcanic Theater Pub before That 1 Guy even played a note. The 7-foot tall, homemade collection of ...

Adele proves 'Hello' is still great with kid instruments and a toy flip phone on Jimmy Fallon
Adele joined Jimmy Fallon and the Roots to perform "Hello" on classroom instruments during Tuesday night's "Tonight Show." The performance wouldn't ...

Adele takes on "Hello" with classroom instruments
The British singer sounded flawless during her visit to "The Tonight Show Starring Jimmy Fallon" on Tuesday

Netflix Acquires Global Rights To ‘Shadowhunters: Mortal Instruments’, Will Bow Series In January Outside ...
EXCLUSIVE: Netflix has picked up global rights, excluding the U.S., to Constantin Film’s The Shadowhunters: The Mortal Instruments . The streaming ...

Open Post: Hosted By Adele Doing The Classroom Instrument Version Of “Hello”
Open Post is going up sooner than usual today, because I know that many of you are leaving your job early to spend hours preparing for Skanksgiving... ...

'Shadowhunters' Star Katherine McNamara Teases Lots of 'Easter Eggs' for 'Mortal Instruments' Fans
... book series than the movie. Sections News Video Awards 'Shadowhunters' Star Katherine McNamara Teases Lots of 'Easter Eggs' for 'Mortal Instruments' ...

French stationery major BIC buys India's largest maker of writing instruments
BIC – the world’s number two player in stationery – has bought out India’s largest manufacturer and distributor of writing instruments, Cello ...

Resources last updated: 12/26/2015 2:06:41 PM