You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
python logpoints: a literal % in the message text makes every hit log "unsupported format character" instead of the message #1349
Found on 2026-11-28 while reviewing #1346, with real logpoints through the built server against debugpy 1.8.20 on Python 3.13. The behaviour is on main.
What happens
A Python logpoint whose message has a literal % in its text and at least one {…} group logs an error instead of the message:
logMessage: "done 100% {x}"
logged: unsupported format character '%' (0x…) at index …
debugpy turns the message into the expression '<text with %s for each group>' % (g1, g2, …,) and does not escape a % that is part of the text, so Python's % formatting reads it as a format directive. A message with no group is not formatted and keeps its %.
Expected
What the caller wrote is what is logged. The Python policy can double a literal % in the text parts of a message that has groups before it goes to the adapter (the policy already has a hook for the wire form of a breakpoint, which JavaScript uses), and leave a message without groups as it is. The defect itself is debugpy's and should be reported there with the two-line reproduction.
Related: #1334 (messages with f-string syntax), #1346.
Class: a call that succeeds and logs only an error. Path: Python logpoints with a % in the text (progress messages, percentages).
The same class in other engines, measured on 2026-11-28 for the logpoint design note (the engine's template syntax reads the agent's literal text):
Go (Delve): the message's text is handed to Sprintf. 100% {x} logs 100%s%!(EXTRA string="café").
Dart (the SDK's adapter):$ is its own interpolation. cost $5 {x} fails at every hit and then logs a line reading null.
JavaScript:x=${x} logs x=$café (the $ is text and {x} the field); documented behaviour, listed because agents write template-literal syntax.
For Python the design in review removes this for a message that fails as written (100% {x} then logs 100% café). Go needs a fix in Delve; Dart's is the SDK adapter's design and wants a sentence in the guide.
Activity
debugmcpdev commentedon Nov 28, 2026
The same class in other engines, measured on 2026-11-28 for the logpoint design note (the engine's template syntax reads the agent's literal text):
Sprintf.100% {x}logs100%s%!(EXTRA string="café").$is its own interpolation.cost $5 {x}fails at every hit and then logs a line readingnull.x=${x}logsx=$café(the$is text and{x}the field); documented behaviour, listed because agents write template-literal syntax.For Python the design in review removes this for a message that fails as written (
100% {x}then logs100% café). Go needs a fix in Delve; Dart's is the SDK adapter's design and wants a sentence in the guide.fix(python): a logpoint's message is checked by the program's own int…