|
Attention! Read the forum rules carefully before posting a topic.
Try to find an answer in Wiki before asking a question. Submit programming questions in this forum only. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
| Netbeans, Breakpoints, Stepping thru Code |
|
DiamondCutter
|
| Post subject: Netbeans, Breakpoints, Stepping thru Code |
Post rating: 0
|
Posted: Tue 07 May, 2013, 16:27
|
|
User rating: 0
Joined: Wed 03 Apr, 2013, 13:03 Posts: 17 Location: United States, Jersey City
|
|
As a developer of 15yrs in .net mostly, it is a common practice to set breakpoints, watches and numerous other tools to debug the code. Is it possible to do that in NetBeans during historical backtesting throught the ide?
|
|
|
|
|
 |
|
hyperscalper
|
| Post subject: Re: Netbeans, Breakpoints, Stepping thru Code |
Post rating: 0
|
Posted: Tue 07 May, 2013, 17:50
|
|
User rating: 98
Joined: Mon 23 Jul, 2012, 02:02 Posts: 656 Location: United States, Durham, NC
|
|
May be possible, I use Eclipse myself, but best to use debug print approach to do things like that. I do complex multi-threaded programming, and NEVER use the debugger. Just too much trouble.
Not sure how the historical tester would react if it were held up by the debugger... Anyway, I'd guess that you'd need to use the historical tester in STANDALONE mode in order to consider running the debugger. Just sounds like it would be fairly difficult if you could find out what was wrong with your code by a few print statements here and there.
Even when I did .NET work, I rarely if ever used the debugger. There are probably 2 kinds of programmers, those who rely heavily on a debugger, and those who don't.
HyperScalper
|
|
|
|
|
 |
|
DiamondCutter
|
| Post subject: Re: Netbeans, Breakpoints, Stepping thru Code |
Post rating: 0
|
Posted: Wed 08 May, 2013, 04:12
|
|
User rating: 0
Joined: Wed 03 Apr, 2013, 13:03 Posts: 17 Location: United States, Jersey City
|
|
Yea, it is heavily relied upon by most of us in the .net world. To have to revert back to print statements would be like the old javascript days or even sqlserver (tsql) prior to sql2000. And even now javascript has barely caught up with debugging tools. But that is javascript and a little off track of the topic. Using print statements to debug code is archaic and time consuming.
Watches, breakpoints and stepping thru code are features that are built into netbeans, and eclipse I assume, so utilizing them with jforex is the challenge. I suppose by factoring out the jforex api and using csv files for the dataservice may be an option. I'll give it a shot and let you know how it turns out.
I believe if you give these tools a look you will find that they are much less trouble to set up than you may think. The payoff is huge over other methods.
Thanks for your help.
|
|
|
|
|
 |
|
tcsabina
|
| Post subject: Re: Netbeans, Breakpoints, Stepping thru Code |
Post rating: 0
|
Posted: Wed 08 May, 2013, 07:39
|
|
User rating: 164
Joined: Mon 08 Oct, 2012, 10:35 Posts: 676 Location: NetherlandsNetherlands
|
Yes, it is possible to debug (and watches, breakpoints, etc.). As Hyperscalper said, you need the Standalone client, which is sometimes called the API client, or the JForex SDK. There is a wiki page related to it: https://www.dukascopy.com/wiki/#Use_in_NetBeansThe official (Dukascopy`s) way is to use a Maven project (at least for Eclipse), but I found it a bit hard to follow their guidelines on how to set it up. I used Jlongo`s webinar, where he explains quite well (at least for me) how to setup Eclipse and Netbeans: https://www.youtube.com/watch?v=-8T3vCYS ... 6A28CF945ESidenote: If I understand it properly, the maven project setup (again saying, only for Eclipse) could be a better approach, as it could update the java classes automatically if there is new release from Dukascopy. The way to update the jars in the Jlongo setup is to do it manually. A little description about the SDK (which I am sure you will find useless with those years of programing experience, but maybe will help someone else): In the SDK package you will find a src\singlejartest\TesterMain.java source, which is calling the defined strategy (by default, the MA_Play.java, which is also in the SDK). You have to start (debug) this class (TesterMain), in your IDE, and then you can reach your defined breakpoints in your strategy. Good luck!
|
|
|
|
|
 |
|
API Support
|
| Post subject: Re: Netbeans, Breakpoints, Stepping thru Code |
Post rating: 0
|
Posted: Wed 08 May, 2013, 07:50
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
tcsabina wrote: The official (Dukascopy`s) way is to use a Maven project (at least for Eclipse), but I found it a bit hard to follow their guidelines on how to set it up. Maven is built in both in Eclipse and NetBeans, you simply have to follow 5 and 4 steps respectively given in wiki to launch a JForex-SDK program. Please elaborate, what is there hard to comprehend?
|
|
|
|
|
 |
|
tcsabina
|
| Post subject: Re: Netbeans, Breakpoints, Stepping thru Code |
Post rating: 0
|
Posted: Wed 08 May, 2013, 12:19
|
|
User rating: 164
Joined: Mon 08 Oct, 2012, 10:35 Posts: 676 Location: NetherlandsNetherlands
|
I must admit that the steps for Eclipse look quite simple and easy to follow. I tried to setup my environment last October based on the linked Wiki page, and failed for a reason that I don`t remember (could very much be my lack of experience with Eclipse...). Then I found the linked webinar, and used it successfully. It worth to give it a try again... PS: Was the Wiki page updated since October? 
|
|
|
|
|
 |
|
API Support
|
| Post subject: Re: Netbeans, Breakpoints, Stepping thru Code |
Post rating: 0
|
Posted: Wed 08 May, 2013, 13:49
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
tcsabina wrote: PS: Was the Wiki page updated since October? Yes it has, now the JForex-SDK project gets released as Maven not Eclipse project. The tutorial you refer to uses the old project configuration.
|
|
|
|
|
 |
|
DiamondCutter
|
| Post subject: Re: Netbeans, Breakpoints, Stepping thru Code |
Post rating: 0
|
Posted: Fri 10 May, 2013, 00:48
|
|
User rating: 0
Joined: Wed 03 Apr, 2013, 13:03 Posts: 17 Location: United States, Jersey City
|
|
The first time I tried to set up netbeans and maven I failed. The second time it was a breeze. That said, I still can't get it to break on a breakpoint. Haven't had time to try csv files idea. Was hoping someone from Dukascopy would chime in as say, Yea, it's easy, here is how you do it. I misspoke, I have a lot of exp in .net, zero experience in java and netbeans.
|
|
|
|
|
 |
|
API Support
|
| Post subject: Re: Netbeans, Breakpoints, Stepping thru Code |
Post rating: 0
|
Posted: Fri 10 May, 2013, 07:43
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
DiamondCutter wrote: Was hoping someone from Dukascopy would chime in as say, Yea, it's easy, here is how you do it. In general we don't support any IDE, rather the JForex-API. For the particular case: - Have you succeeded in debugging a HelloWorld program in NetBeans?
- Did you manage to add a logging statement in the Main.java program in the JForex-SDK project such that it prints to the console?
- If so, please put the break point on that statement and run the program in the Debug mode.
|
|
|
|
|
 |
|
tcsabina
|
| Post subject: Re: Netbeans, Breakpoints, Stepping thru Code |
Post rating: 0
|
Posted: Fri 10 May, 2013, 09:42
|
|
User rating: 164
Joined: Mon 08 Oct, 2012, 10:35 Posts: 676 Location: NetherlandsNetherlands
|
|
I would say, give it a try wiht Eclipse. I think there are more users here with Eclipse as the IDE, so probably we could give some hints...
|
|
|
|
|
 |
|
jlongo
|
| Post subject: Re: Netbeans, Breakpoints, Stepping thru Code |
Post rating: 1
|
Posted: Fri 10 May, 2013, 09:52
|
|
User rating: 94
Joined: Mon 06 Feb, 2012, 12:22 Posts: 357 Location: Portugal, Castelo Branco
|
|
Hi all:
Just to inform that the changes made to the way that JForex SDK is installed in both IDE's makes my webinar obsolet as you now need to add/import/open a maven project to the IDE and can't add the libraries as show on the webinar. Maybe i will make other webinar how to use this new way.
Trade well
JL
|
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|