Troubleshooting Advice

I’m looking for some troubleshooting advice. Within my code somewhere I’m reverting to a baud rate 13 or 57600 from 8 or 9600. I have attempted to trap the code that makes the change but have had no success. One might think I’ve set a property or constant but I do not find it. Is there a method one might use to detect what is making the change? The serialConnection I’m using is generated in code and then further subclassed.

search for “.Baud” and put a breakpoint at each found occurence, then run and see when and where it happens.

in the base class there’s not much you can do
basically you have to search your code for any place you might set that property

in the subclasses you could shadow the baud rate property and make it a computed property then put a break point in the setter
if you only ever use the subclasses in your code then you’ll find it

Seems rather strange that .baud shows up in only three places and two are rem statements. Go figure. I’ve spent hours trying to locate it but admit it was organically set up to use both baud rates. It became messy with little added benefit due to different delay settings needed to work with the controller it was interfacing with. Recently I backed out all of the 57600 baud code, well almost.

if you’re seeing you’re typing the same code twice in an app, then you should make a method and call that method.
easier to maintain when the program gets bigger.