Search me, O God, and know my heart! Try me and know my thoughts!
And see if there be any grievous way in me, and lead me in the way everlasting!
Psalm 139:23–24 (ESV)
Search me, O God, and know my heart. He [David] is sure that even by such an investigation there will be found in him no complicity with the wicked. We may each one desire such searching, for it would be a terrible calamity to us for sin to remain in our hearts unknown and undiscovered.
Try me, and know my thoughts. Read not alone the desires of my heart, but the fugitive thoughts of my head. What a mercy that there is one being who can know us to perfection! He is graciously inclined towards us, and is willing to bend his omniscience to serve the end of our sanctification. Let us pray as David did, and let us be as honest as he. We cannot hide our sin: salvation lies the other way, in a plain discovery of evil, and an effectual severance from it.
And see if there be any wicked thing in me. See whether there be in my heart, or in my life, any evil habit unknown to myself. If there be such an evil way, take me from it, take it from me. No matter how dear the wrong may have become, nor how deeply prejudiced I may have been in its favor, be pleased to deliver me therefrom altogether, effectually, and at once, that I may tolerate nothing which is contrary to thy mind. As I hate the wicked in their way, so would I hate every wicked way in myself.
And lead me in the way everlasting. If thou hast introduced me already to the good old way, be pleased to keep me in it, and conduct me further and further along it. It is a way which thou hast set up of old, it is based upon everlasting principles, and it is the way in which immortal spirits will gladly run forever. Conduct me into it, O Lord, and conduct me throughout the whole length of it.
Spurgeon, C. H. (1993). Psalms. Crossway classic commentaries (Ps 139:23–24). Wheaton, Ill.: Crossway Books.