UI Debugger

Discussion in 'Mod Discussions' started by masterdigital, August 4, 2013.

  1. masterdigital

    masterdigital Uber Alumni

    Messages:
    438
    Likes Received:
    833
    So I have permission to release the tool we use internally to test and develop UI scenes. This will *probably* be included in the next patch, so everyone will get a copy. However, I am going to try and put up a link so interested parties can get it early. The file is too large to attach, so here is a link:

    https://myaccount.dropsend.com/pickup/f ... 64ed5cfe64

    I think dropsend limits the number of times a file can be downloaded, so the link will probably stop working before too long. If you do manage to get a copy, feel free to distribute it however you want.

    If you get the debugger to run, enter:
    http://127.0.0.1:9999
    for the URL, and then press go.

    If it matters, the debugger was developed by Coherent Labs and wraps the webkit debugger.
  2. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Mirror: http://files.raevn.com/PA/Debugger.zip

    Not sure if this is happening to other people, but copy + pasting this link to a new tab works, but clicking it from here redirects to a 404 error page for the Thames Regional Ecological Association. Odd.
  3. oxide246

    oxide246 Active Member

    Messages:
    249
    Likes Received:
    30
    Awesome, this is extremely helpful!

    I had setup a VirtualHost on WAMP to point to my PA directory which worked with relative success.. a bit hit and miss though. This is much better. Thank you!
  4. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    So does this mean I won't have to do try and error debugging on ui mods anymore?
    Awesome! :D

    mirror: http://www.nanodesu.info/stuff/pa/tools/Debugger.zip

    EDIT:
    So I tried it and it is pretty cool on a first look. However there is one thing with the current modding system that makes this problematic. When a mod js file has some syntax error it fails to show the info from the file, as you load it in some way that the debugger can't understand. So it always looks like this:

    [​IMG]
    It tells me what kind of syntax error I have (and that I have one, it's already pretty helpful), but not where. Ingame js files don't have this problem, they show me a full stacktrace up to the exact point of the problem.

    Can this be fixed somehow?
  5. masterdigital

    masterdigital Uber Alumni

    Messages:
    438
    Likes Received:
    833
    I don't know an easy way to fix that problem. It occurs because the js files are dynamically loaded. However, pressing F5 while the debugger is focused will reload the page (including your mod) while the game is running. So if you can comment out sections of code until you find the problem. Alternatively, you might want to compose your code in an editor with js syntax highlighting.

    If you directly edit the scene html files, it should give you a line number for errors. Once the mod works, you could then move the code into a mod file.
  6. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Hmm, well it still is pretty helpful. I guess I can just write my code in the game's js files and copy it away afterwards.
  7. Gorbles

    Gorbles Post Master General

    Messages:
    1,832
    Likes Received:
    1,421
  8. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    at that point can I have your dropbox? :p
  9. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    I'm guessing it's not supposed to look like this, eh? :)
    Oh well. This was with Kubuntu 13.04 by the way.

    Attached Files:

  10. masterdigital

    masterdigital Uber Alumni

    Messages:
    438
    Likes Received:
    833
    Yep. Coherent on Linux sometimes does that.
  11. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    This error:
    Code:
    GLX EXT Swap interval not supported
    This seems to happen because GLX_EXT_swap_control is not found in open source drivers, only GLX_MESA_swap_control. Interesting if there some way to bypass GLX extension check...

    What drivers you use? Do you get same error as me?
    Last edited: September 8, 2013
  12. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Yup, I get that error too.
    Code:
    GLX EXT Swap interval not supported
    Detected GLSL version: 1.30
    4091 17:58:07.771391 I | Initializing Coherent UI ver. 1.4.0.0
    4091 17:58:13.549860 I | Uninitializing Coherent UI
    4091 17:58:13.600455 I | Coherent UI uninitialized successfully
    I'm using the Intel drivers for the HD4000. From the output of PA itself:
    Code:
    [13:59:08.184] INFO GL_VENDOR: Intel Open Source Technology Center
    [13:59:08.184] INFO GL_RENDERER: Mesa DRI Intel(R) Ivybridge Mobile
    [13:59:08.184] INFO GL_VERSION: 3.0 Mesa 9.2.0-devel
    [13:59:08.184] INFO GL_SHADING_LANGUAGE_VERSION: 1.30
    I tried it with optirun and primusrun as well to get it to use the Nvidia card, but that doesn't work either. It gives me the same trouble as PA itself. (Even though that bug is still "unconfirmed" ;) )
  13. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Yeah I'm use open source driver too, but R600g.

    Probably Uber can ask Coherent to add optional GLX_MESA_swap_control support because it's seems like this extension based on earlier Mesa realization and they actually need to do the same thing.

    I'm confirmed this, but keep in mind I'm trying only confirm issues I'm can reproduce myself.
    I'm don't have any laptops with Nvidia hardware, so I can't really check it.
  14. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Oh this error wasn't related to problem. :oops:

    You just need to copy "html" directory and Debugger executable to same dir with "PA" executable. This pink color mean Coherent_Host not started correctly.
    DeathByDenim likes this.
  15. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Brilliant! That seems to work. How on earth did you figure that out?
  16. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    masterdigital confused me with his answer a bit, but I'm read "icon fix" on bugtracker and decide to run debugger because I'm use R600g and need this fix badly. E.g I'm think about port redirection to LAN and running debugger on my laptop with Windows installed.

    First i'm tried it with Wine (failed), then managed to see same problem on Windows and then find out what's is real problem and managed to run it properly on my desktop.
    Last edited: September 11, 2013
  17. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    What about new version of Debugger? May be you can bundle it with game?
    Old version not working with current version of Coherent, but I'm still able to use it by starting debugger with old Coherent.
  18. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    The old version of the debugger works just fine for me.
  19. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    On Linux old version of debugger don't work with new version of Coherent host, e.g I still can run it with older version of game, but new users can't get it work because they can't download older builds.
  20. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Well whatever the reason, on Windows 7 it just keeps working old debugger <> new patch

Share This Page