Skip to content

Add retry-mechanism to the threadsRequest-method as sometimes it is called too early #284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
martin-fleck-at opened this issue Jul 29, 2021 · 0 comments

Comments

@martin-fleck-at
Copy link
Contributor

In our use case using GDB as Debugger and Eclipse Theia as frontend, we encountered a scenario where the threadsRequest is called too early. In our scenario one debug session is already running and then a second debug session is started. There are 8 threads created in the first session, and 4 in the second session. What happens is that GDB reports that a new thread is created/started and the UI wants to update the thread information by sending a threads request to the debug adapter, resulting in the following error from GDB:

Cannot execute this command while the target is running.
Use the interrupt command to stop the target and try again.

Even without interrupting any running thread, we can query the threads just a few hundred milliseconds later. It is not obvious to me whether this is how it is supposed to work or whether there is any deeper issue underneath. Nevertheless, I am curios whether other people encountered similar cases. We solved our issue by simply re-trying that particular request a few times, so I though that might also be of interest to other people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant