Skip to content

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

Open
@martin-fleck-at

Description

@martin-fleck-at

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions