PBTracer as a FireFly's Tool

Started by Marco Pontello, October 31, 2004, 10:31:18 PM

Previous topic - Next topic

Marco Pontello

For me, one of the reason for getting FireFly was to (finally) relasing a polished version of PBTracer, with a GUI interface.

Today, after updating to the latest 1.09, I have tried to see how PBTracer could be possibly integrated in FireFly even in it's present state (command line driven for the Injector, text mode for the browser).
I added two switch, one to process also include files, and one to overwrite the original source. This way, it become possible to use PBTracer Injector as a pre-compile tool and automate the whole process.

Here's what to do to play a bit with it:

  • Download the PBTracer beta/test package from here (around 50KB).
  • Unzip in a suitable folder (ex. C:\PBTracer)

  • In the FireFly's Tools menu, add a new entry as follow:

    Tool name: PBTracer Injector
    Command Line: PBTInj
    Parameters: <o><s> /O /I
    Working Folder: C:\PBTracer
    Action: Invoke during pre-compile
    Wait for Tool to complete before continuing: checked



  • Create another entry like:
    Tool name: PBTracer Browser
    Command Line: PBTracer
    Parameters:
    Working Folder: C:\PBTracer
    Action: Invoke only when selected by user
Now when you compile a project, the source is automatically injected before invoking the PB compiler. After running/testing the executable, you can then start the PBTracer Browser and "surf" on the execution trace of the last run. For example, you could:

  • jump to the location of the first run time error pressin the [E] key.
  • jump to the end of the trace to see where the program GPFed with [END].
  • jump to the first/last execution of a specific source's line with [J].
  • switch between the source and trace window with [TAB].
  • etc.
N.B.
Currently, near all the lines are injected/instrumented, thus slowing down the execution (from a bit to extremely)! You may be able to see the system drawing button after button on a form! :) I will probably add some kind of profile especially for FF, to exclude some code's regions from the Injection, or something like that.
Beware that, speed aside, there may be also some bugs. Nothing too problematic, hopefully.



Anyway, I hope PBTracer can be useful to someone even in his present form. At least you will enjoy a different point of view on your code, and see some behind-the-scenes working! :)

Bye!

Haakon Birkeland

Exciting, cool.. - keep going Marco!!  :thumbsup:

John Messingham

This app looks like it could help me out. I have set it up as per the posting above, but I cannot get it to do anything. I am developing on XP(Home). Any clues will be most welcomed.

Marco Pontello

My fault, I forgot some details that need to be taken care of, due to the primitive state of the tools.
All the injected code contain hardcoded reference to the "\PBTracer\" folder, so PBTracer must be installed in that folder, in the root of the drive in witch the application is run.
So, maybe you develop on a D: or other drive, and then it may simple a matter of moving the installed forlder.
If the application start but complain about the missing PBTracer.DLL, copy it from the PBTracer folder to the application folder (or somewhere in the path).
Also, note that the the "/I" switch is a capital "i", not a "l".

Hope this help,
Bye!