# Event for debug line

**URL:** https://forum.alternetsoft.com/t/event-for-debug-line/278
**Category:** AlterNET Studio Support
**Tags:** scripter, wpf
**Created:** [December 29, 2021, 2:56pm UTC](https://forum.alternetsoft.com/t/event-for-debug-line/278 "2021-12-29T14:56:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dfdsfsdfdaf](https://forum.alternetsoft.com/letter_avatar_proxy/v4/letter/d/606060/32.png) [@dfdsfsdfdaf](https://forum.alternetsoft.com/u/dfdsfsdfdaf)
#### Post date: [December 29, 2021, 2:56pm UTC](https://forum.alternetsoft.com/t/event-for-debug-line/278/1 "2021-12-29T14:56:32Z")

</div>

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

---

<div class="post-metadata">

### Author: ![yevgeni.zolotko](https://forum.alternetsoft.com/user_avatar/forum.alternetsoft.com/yevgeni.zolotko/32/25_2.png) [@yevgeni.zolotko](https://forum.alternetsoft.com/u/yevgeni.zolotko)
#### Post date: [December 30, 2021, 10:34am UTC](https://forum.alternetsoft.com/t/event-for-debug-line/278/2 "2021-12-30T10:34:16Z")

</div>

Hello,

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.

---

<div class="post-metadata">

### Author: ![dfdsfsdfdaf](https://forum.alternetsoft.com/letter_avatar_proxy/v4/letter/d/606060/32.png) [@dfdsfsdfdaf](https://forum.alternetsoft.com/u/dfdsfsdfdaf)
#### Post date: [December 30, 2021, 12:31pm UTC](https://forum.alternetsoft.com/t/event-for-debug-line/278/3 "2021-12-30T12:31:59Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![yevgeni.zolotko](https://forum.alternetsoft.com/user_avatar/forum.alternetsoft.com/yevgeni.zolotko/32/25_2.png) [@yevgeni.zolotko](https://forum.alternetsoft.com/u/yevgeni.zolotko)
#### Post date: [December 31, 2021, 8:21am UTC](https://forum.alternetsoft.com/t/event-for-debug-line/278/4 "2021-12-31T08:21:36Z")

</div>

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?
