-
Notifications
You must be signed in to change notification settings - Fork 191
Closed
Description
Environment data
- debugpy version:
1.6.4 - OS and version:
ArchLinux6.1.0-rc8-1-mainline - Python version (& distribution if applicable, e.g. Anaconda):
Python 3.10.8 - Using VS Code or Visual Studio:
VS Code 1.73.1 6261075646f055b99068d3688932416f2346dd3b x64
Actual behavior
When setting a log point with a condition, the log message is printed when the line is hit, but the debugger also stops the process.
Expected behavior
If log message is set, process must not be stopped (per Debugger Adapter Protocol spec):
If this attribute (ie
logMessage) exists and is non-empty, the debug adapter must not 'break' (stop) but log the message instead.
The spec does not make an exception to this when conditon or hit count is specified.
Steps to reproduce:
- Open any python project.
- Right click the red dot on any line and select to Log Message.
- Enter an expression to log.
- Add condition as well.
- Start debugger.
Some DAP protocol logs:
{"command":"setBreakpoints","arguments":{"source":{"path":"/home/bob/file.py","sourceReference":0},"lines":[120],"breakpoints":[{"line":120,"condition":"{request.GET.get('id') == 1}","logMessage":"ID is set!"}],"sourceModified":false},"type":"request","seq":131}
{"seq": 293, "type": "response", "request_seq": 131, "success": true, "command": "setBreakpoints", "body": {"breakpoints": [{"verified": true, "id": 20, "source": {"path": "/home/bob/file.py", "sourceReference": 0}, "line": 120}]}}
{"seq": 296, "type": "event", "event": "output", "body": {"output": "ID is set!\n", "category": "stdout", "source": {}}}
{"seq": 297, "type": "event", "event": "stopped", "body": {"reason": "breakpoint", "threadId": 211, "preserveFocusHint": false, "allThreadsStopped": true}}Notice the last stopped event which should not be there.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels