Script editor V12 & debug

hi all

how do you write & debug code in V12 ?

I was told that I can only use eclipse and it is very slow to debug + performance is bad + weird to attach eclipse to a process.

eclipse also disconnect from unknown reason during debug.

thx

Barak

  • 0

    Hi Barak,

    I am affraid there is no other official solution.

    Eclipse is now (since the V7) the only way to edit and debug code in Sage X3.

    You can still work with your favorite text editor and paste the code using the ADOTRT function but you can't debug with it.

    There is also the possibility to use the Safe X3 Client with the last version of X3 but I can't recommend this as it is not official and buggy.

    Regards,

    Laurent

  • 0 in reply to L.V. Expertise X3

    Hi Laurent

    thx for your reply

    do you have any tips about how to make the work with eclipse more comfortable?

    writing in eclipse is easier than writing in ADOTRT but debugging is a night mare. 


    I write a lot of a stand alone code that is not part of x3 regular functions/objects. mainly for Web services or user defined function/objects. I have to be able to debug these codes.


    I was instructed to open the same file both in ADOTRT & eclipse. 
    attach eclipse to x3 process where the ADOTRT is open.
    then start debugging , the debugger actually starts by debugging ADOTRT itself. and then the code I wanted.
    there are some weird behaviors also during the process and it is very slow (when pressing F6/F5 etc..) 

    maybe I'm working wrong?

    another question is do you know about  a way in V12 to launch an external program that will return something to X3 as I was able to do in V6? I was told that there is no way.
    we have few important process that work that way: X3-external-X3 synchronous way.

    thx

    Barak

  • 0 in reply to Barak

    For Eclipse I totally understand what you are going through because it's the same for everyone.

    I do the same for debugging. I attach my Eclipse session with my X3 process from Eclipse. It opens the debug perspective on the first action on the X3 session and it is from there attached.
    Next, I use breakpoints and "Dbgaff" to trigger the debug mode in Eclipse when I need it.

    To add some velocity to Eclipse when debugging, make sure you don't have the "Enable Safe X3 Studio debugger trace" On. You also have to be watching as less as possible variables in the "Expressions" panel and don't use too much conditionnal breakpoints.

    Since V7 Sage introduced a lot of interesting things but they always come with some "go back".

    There are ways to launch external programs and retrieve informations on the server side of course but also with the clients through web browsers. It needs to be analysed first and can't be done in this forum.

    To conclude with Eclipse, you can find on this link some good informations regarding debugging with Eclipse : https://www.youtube.com/watch?v=O608lInjCyg

    Laurent