Event for debug line

Is there an event for debugger to send out before/after execute one line?


You could handle ScriptDebugger.ExecutionStopped event to get notified when one line of code is executed in the debugger. ExecutionStoppedEventArgs.StopReason and ExecutionStoppedEventArgs.Position will provide more information about the event.

Thanks for the help. Yes, I have tried use the ScriptDebugger.ExecutionStopped event and I create a Thread to do a time consumed job and call the debugger.Continue after the job finished in the thread method. But I found the ScriptDebugger.ExecutionStopped event raised several times during time consumed job working. Then the thread is run several times.

Could you please make a small code example that reproduces the problem you are describing? You could start with one of our samples, like StudioDemo, or make a simplest possible example from scratch?