PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Debugging  (Read 661 times)

RhodyRich

  • Guest
Debugging
« on: December 30, 2008, 09:08:06 AM »

Can I use the PB debugger with my Firefly project? If so, how? If not, what alternatives are there?
Logged

TechSupport

  • Guest
Re: Debugging
« Reply #1 on: December 30, 2008, 03:07:38 PM »

I guess you could use the PB Debugger by loading the CODEGEN_*.MAIN.BAS program from your project. Personally, I rarely use the PB Debugger. I use well placed MsgBoxes to display variables that I'm interest in. I also use FF_Control_SetText to out values to a Caption (say, the caption of the main form in the project). I have also used a menu option with an accelerator so I can invoke a messagebox when I need it during execution (say, F12 or something).

Other here use more sophisticated methods. Just do a search on "debugging" - there should be some posts.
Logged

RhodyRich

  • Guest
Re: Debugging
« Reply #2 on: December 30, 2008, 08:11:53 PM »

I do use the message boxes but sometimes the debugger is just quicker. Nice to set breakpoints and be able to trace the code. Not sure why you have an aversion to using it. Will there someday be a debugger for FireFly?
Logged

TechSupport

  • Guest
Re: Debugging
« Reply #3 on: December 30, 2008, 11:26:22 PM »

I have no adversion to using it.... other than the fact that it was deadly slow back in PB6/7. Since that time, I've learned to live without it. I guess that PB8/9 it is probably better. I have used it a few times in the rare cases where I had to track down really hard to find bugs.

FireFly will not have a built in debugger. It is just too difficult because we (3rd party developers) do not have access to the PB debug symbol file structure. So, essentially I would have to create a debugger from scratch.

I'd rather just run the code generated code through the debugger in the cases when I really need it.

Logged

RhodyRich

  • Guest
Re: Debugging
« Reply #4 on: December 31, 2008, 07:26:51 AM »

The PB debugger can be a problem. I have encountered strange errors when using it. One was recently corrected by PB. Others I have just not had the time to report. When it works for me, I like it. Wish it always worked. Maybe you could enhance your message box designer to allow quick creation of a message box to capture specific variables. Something like picking local or global variables from a list and have a message box quickly created to paste in.
Logged

tom cone jr

  • Guest
Re: Debugging
« Reply #5 on: December 31, 2008, 08:18:23 AM »

Perhaps another way to facilitate debugging from within FireFly would be to provide a scratchpad that we could write to from within our code.  Something that is always present during a FF design session, that we could show, hide, or clear from the designer menu.  All we'd need then in the code would be something like a

scratch_Pad.writeln("this line will appear in the scratch pad")

This would let us easily push text to the scratch pad while debugging, clear the scratch pad from the designer menu, and continue debugging.
Logged