2 Chronicles 32:31

31 But when envoys were sent by the rulers of Babylon to ask him about the miraculous sign that had occurred in the land, God left him to test him and to know everything that was in his heart.

Read 2 Chronicles 32:31 Using Other Translations

Howbeit in the business of the ambassadors of the princes of Babylon, who sent unto him to enquire of the wonder that was done in the land, God left him, to try him, that he might know all that was in his heart.
And so in the matter of the envoys of the princes of Babylon, who had been sent to him to inquire about the sign that had been done in the land, God left him to himself, in order to test him and to know all that was in his heart.
However, when ambassadors arrived from Babylon to ask about the remarkable events that had taken place in the land, God withdrew from Hezekiah in order to test him and to see what was really in his heart.

What does 2 Chronicles 32:31 mean?

John Gill's Exposition of the Bible
2 Chronicles 32:31

Howbeit, [in the business of] the ambassadors of the princes
of Babylon, who sent unto him to inquire the wonder that was [done]
in the land
Not to see the two tables of stone which were in the ark, with the other two that were broken because of the sin of the calf, as the Targum; nor to ask about the destruction of the Assyrian army, and the manner of it, as Grotius; but to be informed of the miracle of the sun's going back ten degrees, when Hezekiah was recovered from his sickness; the Chaldeans being a people much given to astrology, and curious in their observations of that kind:

God left him to try him;
by showing him all his treasures:

that he might know all that was in his heart;
not that God might know, who knows all things, unless spoken of him after the manner of men; but rather that Hezekiah might know the pride lurking in his heart, and other sins which escaped his notice, ( Jeremiah 17:9 ) or that it might be known by others; that the children of men might know it, as Kimchi; and take warning by it, and observe the frailty and infirmity of the best of men.

California - Do Not Sell My Personal Information  California - CCPA Notice