Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can't seem to get the Jedi jcl debugging IDE stuff to appear... :(

0 views
Skip to first unread message

Paul Nicholls

unread,
Sep 27, 2001, 7:42:01 PM9/27/01
to
Hi all, I am trying to debug a program so I downloaded the

ftp://delphi-jedi.org/Code_Library/Release_1_11/jcl.zip

but I can't seem to work out how to get the IDE extra exception debugging
stuff to appear in the IDE or work at all :(
Does anyone have some complete instructions on what to install and in which
order, I just can't seem to get it right...

Thanks in advance,
Paul Nicholls (Delphi 5) Live long and optimise!
"Life is a beach - every so often you are swept out to sea by a rip and get
into trouble!" - Paul Nicholls

Home Page: www.southcom.com.au/~phantom
< IF YOU WANT TO EARN MONEY WHILE YOU SURF ON THE NET GO HERE: >
< http://www.alladvantage.com/go.asp?refid=BEM-274 >


Barry Kelly

unread,
Sep 28, 2001, 3:07:58 PM9/28/01
to
In article <3bb3b8c6_2@dnews>
"Paul Nicholls" <paul_f_...@hotmail.com> wrote:

> Hi all, I am trying to debug a program so I downloaded the
>
> ftp://delphi-jedi.org/Code_Library/Release_1_11/jcl.zip

I presume you've got the stuff in jcl.zip in a directory that's on your
search path. If you configure the IDE to generate a .map file (Linker
page of project options), you can get extra debug information without
having to install the IDE extension. However...

> but I can't seem to work out how to get the IDE extra exception debugging
> stuff to appear in the IDE or work at all :(
> Does anyone have some complete instructions on what to install and in which
> order, I just can't seem to get it right...

Go to

http://www.delphi-jedi.org/Jedi:JCLDOWNLOADS

and get yourself

* The Debug Extension Pack

After you've installed this, add this code to your
Application.OnException event (use TApplicationEvents or do it
manually):
---8<---
uses JclDebug, {etc};

// ...

procedure TForm1.AppException(Sender: TObject; E: Exception);
begin
ShowMessage(Format('Exception %s: %s at %s',
[E.ClassName, E.Message, GetLocationInfoStr(ExceptAddr)]));
end;
--->8---

Then, build your project using the Debug Build:
* Save All
* Project | Build JCL Debug <...>

Finally, run and cause an exception. The JclDebug unit has lots of other
stuff for line and function information; in fact the whole JCL has lots
of stuff...

-- Barry

--
If you're not part of the solution, you're part of the precipitate.
Team JEDI: http://www.delphi-jedi.org
NNQ - Quoting Style in Newsgroup Postings
http://web.infoave.net/~dcalhoun/nnq/nquote.html

Paul Nicholls

unread,
Sep 30, 2001, 8:33:34 PM9/30/01
to
I had already downloaded the Debug Extension Pack, but thanks for the info
Barry :)
I will give it a go again...

--


Paul Nicholls (Delphi 5) Live long and optimise!
"Life is a beach - every so often you are swept out to sea by a rip and get
into trouble!" - Paul Nicholls

Home Page: www.southcom.com.au/~phantom
< IF YOU WANT TO EARN MONEY WHILE YOU SURF ON THE NET GO HERE: >
< http://www.alladvantage.com/go.asp?refid=BEM-274 >

Barry Kelly <dyn...@eircom.net> wrote in message
news:3gi9rt0f1ni27emq9...@4ax.com...

Paul Nicholls

unread,
Oct 1, 2001, 10:34:33 PM10/1/01
to
Thanks Barry, I have got this working now :)

One small question...is it possible to show the line number of the source
code that executed the offending method call, etc?

For example:

Lets say I use this code before an object is created:

StandardObject1.ShapeType := stRoundRect;

and an exception is called...
Is it possible to have this source code line number, etc. to be displayed
instead of the

procedure TPNStandardObject.SetShapeType(Value : TShapeType);
begin
FShapeType := Value; // <---------------------------this line is
displayed of course at the moment
Invalidate;
end;


Cheers Barry,


Paul Nicholls (Delphi 5) Live long and optimise!
"Life is a beach - every so often you are swept out to sea by a rip and get
into trouble!" - Paul Nicholls

Home Page: www.southcom.com.au/~phantom
< IF YOU WANT TO EARN MONEY WHILE YOU SURF ON THE NET GO HERE: >
< http://www.alladvantage.com/go.asp?refid=BEM-274 >

Barry Kelly <dyn...@eircom.net> wrote in message
news:3gi9rt0f1ni27emq9...@4ax.com...

Barry Kelly

unread,
Oct 3, 2001, 5:38:40 AM10/3/01
to
In article <3bb92702$1_1@dnews>
"Paul Nicholls" <paul_f_...@hotmail.com> wrote:

> Thanks Barry, I have got this working now :)
>
> One small question...is it possible to show the line number of the source
> code that executed the offending method call, etc?

function FileByLevel(const Level: Integer): string;
function ModuleByLevel(const Level: Integer): string;
function ProcByLevel(const Level: Integer ): string;
function LineByLevel(const Level: Integer ): Integer;
function MapByLevel(const Level: Integer;
var _File, _Module, _Proc: string; var _Line: Integer): Boolean;

where Level is the distance up the call hierarchy you want. 0 is the
current procedure, 1 is the procedure that called that, 2 the procedure
above that, etc.

I'd also appreciate it if you could reduce your quotes a little - this
page has some tips:

> > NNQ - Quoting Style in Newsgroup Postings
> > http://web.infoave.net/~dcalhoun/nnq/nquote.html

Thanks.

Paul Nicholls

unread,
Oct 3, 2001, 6:36:12 PM10/3/01
to
Thanks for the info Barry :-)

>I'd also appreciate it if you could reduce your quotes a little - this
>page has some tips:
>
>> > NNQ - Quoting Style in Newsgroup Postings
>> > http://web.infoave.net/~dcalhoun/nnq/nquote.html

Sorry about the over quoting; normaly I'm pretty good at not doing too much,
but I slipped up :(

--

Dean Hill

unread,
Oct 8, 2001, 2:32:21 AM10/8/01
to
Hi Barry,

I have been looking into the debug package and it is excellent. I have a
couple of questions if you wouldn't mind. Is it posible to do the
equivilent of a Build JCL Debug from the command line? In the
DebugExtension folder there is a thread name expert. What does it do?

Thanks in advance

Dean

"Barry Kelly" <dyn...@eircom.net> wrote in message

news:3mrjrt0mpdvpqv5um...@4ax.com...

Barry Kelly

unread,
Oct 8, 2001, 10:00:08 PM10/8/01
to
In article <3bc148f7_1@dnews>
"Dean Hill" <de...@global.co.za> wrote:

> I have been looking into the debug package and it is excellent.

You've got Petr Vones to thank (pet...@mujmail.cz) - I'm sure he'd
appreciate a note of appreciation.

> I have a
> couple of questions if you wouldn't mind. Is it posible to do the
> equivilent of a Build JCL Debug from the command line?

The source is freely available - you should be able to engineer that
without too much difficulty (I haven't done it myself, however). Most of
the functionality is in the JclDebug unit (the map file parser, the
compressed format writer etc.).

Alternatively, you could just generate a map file (dcc32 -gd) and make
sure the map file (<your exe name>.map) is in the same directory and has
the same stem as the executable. JclDebug.pas will search for a map file
if it doesn't find the compressed format as a resource.

> In the
> DebugExtension folder there is a thread name expert. What does it do?

No idea. You might ask Petr that.

-- Barry

--
Team JEDI, 2001 Spirit of Delphi Award Winners

Dean Hill

unread,
Oct 9, 2001, 3:14:19 AM10/9/01
to
Hi,

"Barry Kelly" <dyn...@eircom.net> wrote in message

news:5em3stgh42iauj3e6...@4ax.com...


> The source is freely available - you should be able to engineer that
> without too much difficulty (I haven't done it myself, however). Most of
> the functionality is in the JclDebug unit (the map file parser, the
> compressed format writer etc.).

You were right. I have to say it was really easy. All the work has already
been done. If anyone else is interested the source is at the bottom of the
e-mail. It could be cleaned up etc. Note the application should be
compiled with DCC -GD so that the patcher can do it's stuff.

========================
Source Follows
========================
program JCLPatch;
{$APPTYPE CONSOLE}
uses
SysUtils,
JclDebug;
var
sLinkerBugUnit: String;
iMapFileSize,
iJCLDebugDataSize: Integer;
begin
// Insert user code here
if ParamCount < 1 then
begin
Writeln('ERROR - Please enter JCLPatch <ApplicationName>');
Halt;
end;
if not FileExists(ParamStr(1)) then
begin
Writeln('ERROR - Source file does not exist!');
Halt;
end;
if not FileExists(ChangeFileExt(ParamStr(1),'.MAP')) then
begin
Writeln('ERROR - Source MAP file does not exist!');
Halt;
end;

InsertDebugDataIntoExecutableFile(ParamStr(1),ChangeFileExt(ParamStr(1),'.MA
P'),sLinkerBugUnit,iMapFileSize,iJCLDebugDataSize);
Writeln('File successfully patched!');
Writeln('Linker Bug Unit: '+sLinkerBugUnit);
Writeln('MAP File Size: '+IntToStr(iMapFileSize));
Writeln('JCL Debug Data Size: '+IntToStr(iJCLDebugDataSize));
end.


0 new messages