I posted a question about missing sensor MQTT events last night. It occurred to me that if I could trace the execution flow (as it happens, rather than in my head) it might help either fix the problem and patch it or at least provide more info to the devs.
I was just poking around to see what the best way to allow a remote debugger connection would be (either GDB stubs compiled in or with gdbserver).
Any tips from the devs here?
Everything looks nicely daemonized, if there is a simple executable equivalent someone could share, that would be great! Or is there a debug flag setting somewhere?
(I’m using CLion on a mac, so a network GDB connection would hopefully get me up-and-running).
That was helpful in two ways:
1. I can see the debug prints
2. Was also able to launch that executable via “sudo gdbserver localhost:8899 ./OpenSprinkler” and attach via a network GDB connection.
Note for anyone else doing this you have to add a “-g” flag to the g++ command in ./build.sh (or run it manually) to generate the symbol stubs.
Obviously a maneuver for debugging.
I did figure out why flow-sensor related sensor1 changes weren’t getting logged to MQTT. I’ll follow up to my comment in the 2.1.9(4) release thread.