Issuing debt would usually increase the risk to equity investors, so they
will sell off the stock. This will cause price to go down, which is the
numerator in P/E, so P/E will go down as well.
Mathematically, an increase in debt raises levered beta, which is a key
component of the cost of equity. With a higher cost of equity, stocks will
be valued using a higher discount rate, so the stock price goes down.
There is an exception to this: sometimes, issuing debt is a positive
signal to the market because it allows the company to keep surviving, or
because the debt was raised for a specific project or acquisition that will
boost the value of the company. An example is how Tesla’s stock price
increases when they borrow money because it allows the company to
continue to exist.