(msg: string)
| 241 | async (params) => { |
| 242 | if (!nodeDebugClient) return { content: [{ type: 'text', text: 'Error: No active debug session.' }], isError: true }; |
| 243 | const toCondition = (msg: string) => { |
| 244 | // Replace {expr} with ${expr} inside a template literal |
| 245 | const tpl = '`' + msg.replace(/`/g, '\\`').replace(/\{([^}]+)\}/g, '${$1}') + '`'; |
| 246 | return `console.log(${tpl}); false`; |
| 247 | }; |
| 248 | try { |
| 249 | const condition = toCondition(params.message); |
| 250 | const lineNumber = params.line - 1; |