The only thing I can suggest is to stuff a delay of some length in your code, below, so you might be able to see more of what is happening in setup() before it finishes executing.
waitFor(Serial.isConnected, 10000); // Wait for serial connection
delay(2000); // new
I hope this helps.
https://community.particle.io/t/logging-in-setup-not-working/63079/2