inexorgame-obsolete / deprecated-cube-engine-inexor

UNMAINTAINED: Please have a look at the vulkan-renderer
https://inexor.org
zlib License
11 stars 1 forks source link

Simplify InexorCore debugging experience #462

Open a-teammate opened 6 years ago

a-teammate commented 6 years ago

Currently we have a slight problem when trying to debug inexor-core (the C++-part): We must start inexor-core through our "launcher" (inexor-flex). Hence you need to:

What we want is:

You press the usual "Start" button and it automatically starts Inexor-Core in a debug session.

setting it up

The routine for setting up the debugger in visual studio after this issue is resolved will be:

Fohlen commented 6 years ago

finding a way to invoke flex globally from C++ code seems fairly easy

a-teammate commented 6 years ago

when flex is globally installed: how expensive would it be to listen for new inexor-core processes to be started if the developer flag is set (or: if the binary path fits one in the current instances manager)? I think the above solution is good enough though :)

a-teammate commented 6 years ago

Okay the easiest way to go is simply:

If an instance has autostart = false but autoconnect = true it should really do that: If the port (the instanceid) appears to have a server running: connect to the instance.

Maybe the portscanner has a callback without timeout, or we just start the portscan again after the timeout if no instance appeared. Maybe we could also check periodically (e.g. with https://www.npmjs.com/package/wait-until), dunno. This would make the debugging pretty easy:

  1. you start flex
  2. you run the debugger as usual from inside the IDE
aschaeffer commented 6 years ago

I think if we solve #398 it would be able to start Inexor Core instances independently (either Visual Studio, another IDE or from a shell) and Flex would detect that an instance is already running.

Fohlen commented 6 years ago

Wasn't there an issue on the core side when a stream interrupts? Can multiple clients connect?

aschaeffer commented 6 years ago

Yes, multiple clients can connect and the RPC messages are distributed to all clients. But in this case you would start Inexor Core and then tell Inexor Flex to connect which would be the first client.