vscode-swift icon indicating copy to clipboard operation
vscode-swift copied to clipboard

Expression evaluation input disappears from Debug Console.

Open adam-fowler opened this issue 10 months ago • 7 comments

Describe the bug When running the debugger, the expression evaluation input disappears from Debug Console. So it isnt possible to use lldb commands like po. This doesn't always happen, but it seems to happen most frequently when running tests.

To Reproduce Steps to reproduce the behavior:

  1. Open project with tests
  2. Add break point in test and debug it
  3. Go to debug console
  4. There is nowhere to input po, p style commands

Environment

  • macOS 15.5
  • Apple Swift version 6.1.2 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
  • Visual Studio Code version: 1.100.3
  • vscode-swift version: 2.4.0

adam-fowler avatar Jun 12 '25 17:06 adam-fowler

+1 I encountered this today for the first time (2.4.0). I was also debugging a test.

MahdiBM avatar Jun 12 '25 17:06 MahdiBM

I've seen this happen before and I'm pretty sure it's a VS Code issue. Do you see a cryptic error message in the Developer Tools about something being disposed? When this happened to me none of the other debuggers (NodeJS/CodeLLDB) worked either and I had to restart VS Code.

matthewbastien avatar Jun 12 '25 17:06 matthewbastien

Do you see a cryptic error message in the Developer Tools about something being disposed?

I'm going to pay more attention the next time it happens, but I think yes.

MahdiBM avatar Jun 12 '25 17:06 MahdiBM

I'd also be curious to know if this only happens if you have the debugger set to lldb-dap (which is now the default since 2.2.0) or if it also happens if you change to CodeLLDB. You can set your debugger back end using the setting swift.debugger.debugAdapter.

matthewbastien avatar Jun 12 '25 17:06 matthewbastien

Let me see if I can confirm this ... I was using lldb-dap although usually i would use CodeLLDB because it's more reliable.

MahdiBM avatar Jun 12 '25 17:06 MahdiBM

Mission failed. I did reproduce this 2 times but still can't tell anything for sure. Tried to find a pattern for reproduction but no luck on that either. Tried to capture it happening but ... you guessed it: the bug appears to detect camera usage and only happens off the record.

MahdiBM avatar Jun 12 '25 18:06 MahdiBM

@adam-fowler @MahdiBM as hard as I've tried I cannot reproduce. I'll put it on the backlog to watch for. When it happens again, any extra information you could provide would be great like platform, toolchain version, was it lldb-dap or CodeLLDB, a diagnostic bundle so we can checkout settings. In the meantime if you could set the lldb-dap.log-path setting, we could get a trace log of messages from lldb-dap for when this happens again

award999 avatar Jun 26 '25 13:06 award999