1

Is there an easy way to debug code that is compiled during runtime with the CSharpCodeProvider? Like is it possible to easily setup VS to try compiling it or something?

I would hate to have to keep running the program and having it keep compiling the code to find mistakes.

1 Answer 1

1

I usually put in a Debugger.Launch() and then attach a Debugger. Since you didn't indicate if you're compiling a separate executable and run it in another Process or just execute the code in your/an isolated AppDomain this is the most flexible approach. Make sure to keep a copy of the Source file around and instruct the CSharpCodeProvide to emit a PDB.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.