Skip to content

Commit

Permalink
Отладчик в фоновых заданиях
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilBeaver committed Dec 28, 2022
1 parent 98180c4 commit 97d1db6
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,15 @@ public BackgroundTask Execute(IRuntimeContextInstance target, string methodName,
var worker = new Task(() =>
{
_engine.Environment.LoadMemory(MachineInstance.Current);
task.ExecuteOnCurrentThread();
_engine.DebugController?.AttachToThread();
try
{
task.ExecuteOnCurrentThread();
}
finally
{
_engine.DebugController?.DetachFromThread();
}
}, taskCreationOptions);

Expand Down

0 comments on commit 97d1db6

Please sign in to comment.