How to wire up a ScriptRun.ScriptSource to a DebugCodeEdit?

How can i wire up the ScriptSource from a ScriptRun to a DebugCodeEdit or ScriptCodeEdit, so that i can live change the code and let it compile/run, when i need it to - but let the lexer do its thing automatically, so that i get instant error feedback?

My use case is

  • Single editor instance
  • Clearing the source
  • Overwrite the source with a script (without a file)
  • Load a source from a file
  • Save the source to a file
  • Compile/Execute that source
  • No code behind, everything is abstracted into a service that is injected into the view model

What is correct way to do this (in the simplest way possible)?

Hello,

We looked at this scenario, and while it’s possible, it requires a small change in our debugger, which will be included in the coming update.

I will keep you posted and will attach a sample project when it’s done.

Kind regards,

Dmitry

1 Like

Hello,

I’ve uploaded a sample project showing how to instantiate script debugging from the source code here:

Please let me know if this is what you’re looking for.

Kind regards,Dmitry