How can I debug Custom Code in Visual Studio?

I would like to debug the code that I have written in HL7Spy. How do I do this?

If you have Visual Studio installed, you can add Break(); to the OnStart() method of your custom code to trigger the Visual Studio debugger to launch when you push the “Run” button in the user interface.

  public override void OnStart()
  {
    this.Break();
  }

Once you are in Visual Studio you can set break-points, watch variables, etc.