*Experts* Bucky Posted April 5, 2003 *Experts* Posted April 5, 2003 I have a class that implements an Interface, and a Windows app that compiles the code file at runtime and loads it into a class instance. In this way, I can change the code while the app is running. The only downside is that conventional VS.NET debugging techniques do not work; I can't step through the code, check variable values, etc. The only method I have to debug at the moment is a Debug event that I raise whenver I want to return the value of a variable, but the debugging is very frustrating. How can I have a dynamically-compiled and loaded DLL and still be able to debug it "normally"? Or maybe there's an easier method of debugging? Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
*Gurus* divil Posted April 5, 2003 *Gurus* Posted April 5, 2003 The only way you could get started with this is if you're compiling from a file on disk (you may well be, I don't know) and then loading the assembly dynamically from the compiled version (also on disk). That way, the debugging symbols will be present and point to a valid source file. That ought to be enough for the debugger you're running under to catch the exception and find source code for it. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
*Experts* Bucky Posted April 5, 2003 Author *Experts* Posted April 5, 2003 I see what you mean, but how will VS.NET know when to start debugging the code? When I set a breakpoint in the code, the red circle has a little question mark and it says that no symbols are loaded. Also, the code and compiled DLLs both on the local HD. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.