MCPcopy Create free account
hub / github.com/Norbyte/bg3se / GetThread

Method GetThread

LuaDebugger/DAPMessageHandler.cs:191–215  ·  view source on GitHub ↗
(int threadId, bool allowInactive = false)

Source from the content-addressed store, hash-verified

189 }
190
191 public ThreadState GetThread(int threadId, bool allowInactive = false)
192 {
193 if (threadId == ServerThreadId)
194 {
195 if (!ServerState.Active && !allowInactive)
196 {
197 throw new RequestFailedException("Requested server thread, but there is no active server context!");
198 }
199
200 return ServerState;
201 }
202 else if (threadId == ClientThreadId)
203 {
204 if (!ClientState.Active && !allowInactive)
205 {
206 throw new RequestFailedException("Requested client thread, but there is no active client context!");
207 }
208
209 return ClientState;
210 }
211 else
212 {
213 throw new RequestFailedException($"Requested unknown thread ID {threadId}!");
214 }
215 }
216
217 public ThreadState GetThread(DbgContext context)
218 {

Callers 3

RequestStackVariablesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected