Replies: 12 comments 8 replies
-
Are you launching or attaching? Can you share your specific launch configuration? |
Beta Was this translation helpful? Give feedback.
-
Hi CodeLLDB Team, I am really sorry for the delayed response. I was checking on the latest version of codelldb to see if the issue resolves itself. I tried reproducing the issue with simple c code on latest codelldb 1.11.4. First ,I start the GDB server with executable a.exe using command Which starts the execution of program a.exe on the target machine opens a connection on port 2000 and waits for the debugger to connect. Connecting to program a.exe using below configuration from VSCode (using same configurations for codelldb 1.11.3 and greater): cutom_attach in processCreateCommands is lldb custom command which was created to handle "gdb-rem 2000" command from script (as shown in scripts/attach.py file). So when I run "Debug" configuration from VScode, the expectation is to see the the debug process halted and allow us for further debug. ### Note: The pause issue does not occur if I put the "gdb-rem 2000" command directly in launch.json and comment out the custom_attach command as shown below. I am attaching Please help with inputs on why the issue could be occurring when using scripts but not directly from launch.json. Thank you. |
Beta Was this translation helpful? Give feedback.
-
Hi CodeLLDB Team, Could you please help with this? Why is a manual pause required when we include a custom LLDB command in launch.json, but this issue does not occur when we include the LLDB command directly in launch.json? Your input on this issue would be really helpful, as we are performing image debugging in a similar way. |
Beta Was this translation helpful? Give feedback.
-
Determining whether the debuggee is running or stopped after a custom launch command sequence is kinda flaky, so it's possible that the debug UI is not reflecting the actual state of the debuggee. What you are observing is probably due to a small timing variation between the two methods. |
Beta Was this translation helpful? Give feedback.
-
Sure. I can give it a try using lldb-server for debugging a simple program. I can definitely try it for a simple program just to check if gdbserver causing any issues. |
Beta Was this translation helpful? Give feedback.
-
I was checking lldb verbose logs for the working and non-working cases. Attaching log files for reference Could this debug log make sense regarding the pause issue? Can you please help check the logs to see if they provide any clues about the pause issue? Thank you. |
Beta Was this translation helpful? Give feedback.
-
Hi, I tried using lldb-server, but it did not help. I'm still encountering the same issue. A manual pause is required when using custom LLDB commands in launch.json It's unusual that this issue is occurring with the latest codelldb versions, where the "custom" launch configuration has been deprecated and started using "request": "launch" along with "targetCreateCommands" and "processCreateCommands". We did not experience any such pause issues until codelldb 1.11.1, when we were using "request": "custom" along with "initCommands" and "targetCreateCommands". |
Beta Was this translation helpful? Give feedback.
-
Just to make sure I'm doing it correctly, sharing lldb-server command and launch.json configuration. Starting lldb-server on executable : launch.json please correct, if i did something wrong. |
Beta Was this translation helpful? Give feedback.
-
Hi Vadimcn, The changes in launch.rs and sbprocess.rs highlighted in the screenshots seem to be address the pause issue in the latest codelldb 1.11.4. I have also tested in on my setup. |
Beta Was this translation helpful? Give feedback.
-
Not so simple, unfortunately: during a launch, the process may transiently be in a "stopped" state due to some internal LLDB behavior. In these cases, this change causes the client to wrongly believe that the debuggee is in a stopped state, when it really isn't. I'd recommend trying the "attach" request type instead, as it handles this a bit differently. |
Beta Was this translation helpful? Give feedback.
-
I need some understanding of the 'attach' request in the context of codelldb. As we are doing remote debugging, does the attach request just attach to a process without changing the process state? |
Beta Was this translation helpful? Give feedback.
-
Hi @vadimcn , pause issue with "request": "launch" has been resolved on codelldb1.11.5, which is very relieving. Thank you for handling this. On the other hand, I am facing an issue with the "launch" configuration used for starting gdbserver. VS Code is throwing an error window saying that the "process is not valid"(which is from the latest code where the process state is_alive is being checked in the launch.rs file) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi CodeLLDB Team,
I am facing an issue after upgrading from CodeLLDB 1.11.1 to 1.11.2 (or the latest version).
Previously, our image debugging worked fine using the “custom” attribute. However, since the “custom” attribute has been deprecated in CodeLLDB 1.11.2, I modified my launch.json to use "request": "launch" along with "targetCreateCommands" and "processCreateCommands" as suggested.
The problem I am facing with the new configuration is that after the debuggee process is created, I need to manually press the pause button in the VSCode debug toolbar to start further debugging. By default, the debug toolbar should show as paused because execution stopped at breakpoint.
Could you please help provide guidance on how to resolve this issue and explain why it might be related to the configuration using "request": "launch" along with "targetCreateCommands" and "processCreateCommands"?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions