Skip to content

Commit 6567d5c

Browse files
authored
Fix interpolation in Log points, switch to double quotes (#1270)
* Fix interpolation in Log points, switch to double quotes Fix #2654 * Escape double quotes for log point msgs to make using them easier
1 parent bfe5059 commit 6567d5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PowerShellEditorServices/Services/DebugAdapter/Debugging/BreakpointApiUtils.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public static ScriptBlock GetBreakpointActionScriptBlock(string condition, strin
177177
StringBuilder builder = new StringBuilder(
178178
string.IsNullOrEmpty(logMessage)
179179
? "break"
180-
: $"Microsoft.PowerShell.Utility\\Write-Host '{logMessage}'");
180+
: $"Microsoft.PowerShell.Utility\\Write-Host \"{logMessage.Replace("\"","`\"")}\"");
181181

182182
// If HitCondition specified, parse and verify it.
183183
if (!(string.IsNullOrWhiteSpace(hitCondition)))

0 commit comments

Comments
 (0)