(Your English is fine!)
A good reference is Darrell Duffie and Kenneth J. Singleton, Credit Risk: Pricing, Measurement, and Management, PUP 2003.
The function on Bloomberg that sort of does what you want is VCDS. However it does not do it very well, so you will probably want to implement it yourself.
I will outline my understanding of Duffie and Singleton methodology and VCDS (going back to their 1999 paper in the Review of Financial Studies https://web.stanford.edu/~duffie/ds.pdf ). Any errors are mine alone.
Suppose you are given a bond price and a CDS. You calculate the model price of the bond using the CDS - that is, for each bond cash flow (coupon or notional), you calculate the probability of default derived from the CDS, and discount the cash flow using the risk-free discount factor and (1 - probability of default). You also add the value of the recovery of the notional in case of default. You don't need to assume that the bond will have the same recovery as the CDS if you don't have to (e.g. the bond is highly collateralized). This model price generally will not be the same as your observed market price.
You solve for the bond-CDS basis - determine how much the CDS needs to be shifted in order to explain the market price.
In order to calculate the sensitivity of the bond price to the CDS, you keep the bond-CDS basis constant, perturb the CDS curve (one tenor at a time), reprice the bond, and measure the impact. (Practically, you may prefer to perturb not the observable CDS, but the one shifted by the bond-CDS basis, that matches the observed bond price). Multiplying the CDS sensitivities by the change in CDS quotes at each tenor will tell you how much PL came from the change in each quote.
You should also calculate the sensitivity to the change in the bond-CDS basis, and multiply this sensitivity by the change in the bond-CDS basis and include this product in your PL due to credit.
Further if you follow this methodology and want to minimize the remaining unexplained PL:
when you calculate the sensitivity to interest rates (IR deltas), you should keep the CDS quotes constant and recalculate the survival probabilities using the perturbed IR curve
it helps to include all imaginable second-order sensitivities (various gammas and cross-gammas: CDS x basis, CDS x IR, CDS x recovery...) in your PL explanation