how to put led to indicate the signal is functioning
As Olin points out, it's hard to tell what you're really asking. I'm going to assume that you want an indicator LED to light up whenever the optocoupler in ON. In that case, your circuit should look like the one below:



The "limit switch", when closed, should tied the INPUT signal to 3.3V and light up the indicator LED and the optocoupler's internal LED. The OUTPUT signal goes to an input of your PIC microcontroller.

The value of the resistors will depend on the optocoupler and the LED you choose to use.