I have read that p/e does not take debt into account but EV/EBIT does so is a better measure.
However does PE take interest paid on debt into account? I presume it does and earnings are based on the the final profits after all costs (including interest).
This may sound stupid, but if a 2 companies have the same PE but one is paying interest on debt, is that in some ways a good sign? It is making enough profit to get the same PE even though it has the added expense of debt - which is hopefully temporary.
Neither EPS nor PE take debt into account, apart from allowing for interest paid on any debt. With your example of two companies having the same PE, you could also look at their EBIT/EV ratios and show a preference for the company with the lowest ratio, as this ratio takes debt into account. If the company tends to spend more on research and development than on hard assets like buildings or equipment EV/EBITDA would probably be a better choice as capital expenditure would not be so important.