How to access full variable values while debugging in a Rider plugin?

I’m developing a plugin for Rider and I need to access the runtime values of variables during a paused debugging session. Specifically, I want to inspect the value of a String variable and replace placeholders in it using values from another object (like a dictionary or builder).
Currently, I use the following approach:

val nodes = XDebuggerTreeActionBase.getSelectedNodes(e.dataContext)
nodes.filterIsInstance<XValueNodeImpl>().forEach { node ->
    when (builder.classifyNode(node)) {
        NodeType.SqlText -> builder.sql = node.rawValue?.toString().orEmpty()
        else -> builder.collectParams(node)
    }
}

The problem: rawValue does not contain the actual full value of the variable. If the string is too long, it gets truncated (e.g., ends with ...).

My questions:

  • Is there any way to retrieve the full, actual runtime value of a variable (especially strings) while debugging?
  • Is there a different API or method I should be using to evaluate or extract the true value, not just what’s displayed in the UI?

Use case for context:

var parm = new ParmBuilder();
var sql = $"SELECT * FROM table WHERE id = {parm.AddParm(id)}";

Any pointer to the right API, approach or example would be really appreciated.

After hours and days of searching i finally found a solution for this problem

fun getNodeFullValue(node: XValueNodeImpl): String {
        val latch = java.util.concurrent.CountDownLatch(1)
        var result: String? = null

        node.fullValueEvaluator!!.startEvaluation(object : XFullValueEvaluator.XFullValueEvaluationCallback {
            override fun evaluated(value: String, font: Font?) {
                result = value
                latch.countDown()
            }

            override fun errorOccurred(errorMessage: String) {
                result = "ERROR: $errorMessage"
                latch.countDown()
            }
        })

        latch.await() // Blockiert bis evaluated() oder errorOccurred() aufgerufen wurde
        return result ?: ""
}