Saving CKKS Decryption Step by Step

Hi, I am trying to understand the CKKS decryption stages step by step. I want to see “the number” computed in OpenFHE.

However, if I understand correctly, the function Decrypt() does decryption + decoding. Is there a way to get the decryption only without decoding?

In the Decrypt() function in cryptocontext.cpp, you can see the decryption result is first created as a Plaintext variable (line 577) and then is decoded in between the lines 582-607. To print out the content of a plaintext, you can take a look at Printing plaintext polynomial coefficients vs message vector slots - #2 by Caesar

Thank you for the reply! I see.. There is no specific API/function to do decryption without decoding. Unfortunately, in this way, I need to recompile the OpenFHE every time.

But I still don’t get it, in line 577, we don’t use the private key in that function, I guess it will be in line 584 or line 586, but I am not sure how to print the DecryptResult

Line 577 only sets the parameters of the plaintext result, the decryption happens in the following lines, as you pointed out.
To print the plaintext polynomial, you can try inserting the following line from the link before the line 593:

std::cout << "result DCRTPoly: " << result ->GetElement<DCRTPoly>() << std::endl;