Page 1 of 1

How to use Delphi debugger to debug your strategy

Posted: Fri Aug 14, 2009 6:50 pm
by Terranin
Here it is steps how to use Delphi debugger with strategy in Forex Tester:

1. You need to copy all your strategy files (strategy *.dpr and StrategyInterfaceUnit.pas, TechnicalFunctions.pas) to the <ForexTester>\Strategies\ folder.

2. Compile your strategy before you start ForexTester in this folder. Enable all debug options in Project -> Options -> Compiler. (do not install strategy via File menu, you need to compile it exactly in this folder).

3. Start ForexTester.

4. In Delphi go to menu Run -> Attach to process and select there ForexTester.exe.

5. Now you can set breakpoints, go step by step, and see variables. Works fine for me.

Posted: Thu Jun 03, 2010 3:40 pm
by superdoug3
My environment
Delphi 7, XP / SP3, FT2.6.1
my Stratedgy runs in FT2.6.1 but has bugs

Successfully ran through all of your steps to get Delphi 7 into debug mode, then I set a break point in proc InitStrategy, I then hit F9 to run Delphi with FT.
error message is 'can not debug project unless a host appl is defined, use the Run/Parameters dialog box.
Now, according to taskmanager, FT has stopped responding

Posted: Fri Jun 04, 2010 2:36 am
by FT Support
Hello,

Please check that you cave attached Delphi to the ForexTester.exe process and that you have your Delphi project in [Forex Tester path]/Strategies folder.

Posted: Fri Jun 04, 2010 6:06 pm
by superdoug3
It appears that there is another step to add to this process
in Run/Parameters, you browse to ForexTester > forextester.exe

Now it is running debugger, but I am still having problems,
I set breakpoint inside of getsingleTick, F9 to run, asks me if I want to rebuild because modified, YES, F9 again runs to breakpoint and says 'debugger detected, please close it down and restart'


do you have a link on how I should run Delphi Debugger. I only know
F5 - set breakpoint
F4 - run to here

when I X out of Delphi, seems to have damaged FT and I have to reinstall FT again. Maybe I should unattach FT from Delphi before X out of Delphi ?

Running Delphi 7 on XP-SP3 with FT V 6.2.1

Posted: Sat Nov 30, 2013 12:39 am
by Michalec
1.Run your app
2.Run Process Explorer (after downloading it ;-)
3.Double click on your executable in the process list
Select the Threads tab and there you will see:
The Thread ID
CPU Usage
Cycles Delta
And the start address
The TID ought to be enough to nail down your CPU hogging thread.

Re: How to use Delphi debugger to debug your strategy

Posted: Wed Oct 19, 2016 5:03 am
by arodatos
Hello everybody,
I’m little bit frustrated with this tutorial, seems that everyone is getting the same error. In my view, It would be so helpful to have *.dpr files of the following strategies (included en FT3):

• Strategy1.dll
• Strategy2.dll
• Strategy3.dll
• …
I mean from Strategy 1 to 7.

Please, could someone help us with this?
Many thanks
Alvaro

Re: How to use Delphi debugger to debug your strategy

Posted: Sat Oct 22, 2016 10:06 am
by wasaykh
Yes, agree with Alvaro,

Please help post the source *.dpr files of strategies 1 to 7

Thanks!

Re: How to use Delphi debugger to debug your strategy

Posted: Mon Oct 24, 2016 11:58 am
by arodatos
Dear all,
FT3 support sent me the *dpr file from strategies 1 to 7. If someone is interested, send me an e-mail to alrodatos@gmail.com. I’ll send it back to you.
Regards.
Álvaro