[Question @ Uber] Running multiple debugged instances of PA

Discussion in 'Mod Discussions' started by cola_colin, January 26, 2014.

  1. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    So while developing some mods it is pretty helpful to have 2 instances of PA running.
    However this has one drawback: The debugger runs on port 9999. Because of this only the first of the 2 instances can be attached to the UI debugger. Can the port somehow be configured?
  2. Clopse

    Clopse Post Master General

    Messages:
    2,535
    Likes Received:
    2,865
    Dont you also have a laptop? Or install PA a second time in a different location/drive.
  3. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I have a netbook ;)
    It is far easier to handle when everything is on one machine. Apart from those ports...
  4. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I checked few ideas and find workaround for you:
    1. By default Coherent listen on 127.0.0.1 so you can just run second copy on 127.0.0.2/3/4/5/etc.
    2. Just copy game to other directory.
    3. Open CoherentUI_Host.exe with any binary-safe text editor.
      I personally used Notepad++.
    4. Find "127.0.0.1" with "Coherent UI View" prefix and "/devtools/" suffix.
      In current Coherent executable it's line 99659.
    5. Replace "127.0.0.1" with "127.0.0.2" or any localnet IP you like.
    Done, this copy of game will bind debugger port to different IP! :)

    PS: I did tried '--remote-debugging-port" and few other Chrome-like ways to rebind debugger, but unfortunately it's looks those flags broken in Coherent and brute force method worked fine.
    Last edited: January 26, 2014
    Raevn, proeleert and cola_colin like this.
  5. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    AWESOME
  6. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    You could also use a VM, but I don't really see any benefits to that over SXX's solution.
  7. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    a VM is too much work :p
  8. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Actually there is "better" way than VM. Even on Windows you can force any application to use specific interface/IP, e.g using this tool. There have to be "fake" CoherentUI_Host.exe which run real Coherent with DLL injection.

    It's was my first idea, but on Windows it's pretty hard to put such layer between two executable so I find easier way.
    cptconundrum likes this.
  9. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Hey I saw that tool somewhere before. I can't remember anymore what I was trying to do back then though.
  10. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Actually I do something like that on Linux to run 4 copies of SupCom on same OS. :D
  11. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    lol, nice!
  12. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    wondible and cola_colin like this.

Share This Page