sorry for dumb question: is it possible to debug .net application without recomplile it? i load assembly to DILE v0.2.1, setted breakpoints, and prtess Run button. But program it not break execution at breakpoints.
Assembly compiled in .net v1.1
The main idea of DILE is that you should be able to debug an assembly without recompiling it.
I think the reason must be a breakpoint set error. Unfortunately, you can't set a breakpoint on every IL instruction. Some IL instructions might be compiled only into one x86 assembly instruction so that it's impossible to set a breakpoint on all of them. Mike Stall has a very good explanation of this here: http://blogs.msdn.com/jmstall/archive/2004/10/03/237137.aspx
If this is the reason then please try the following. Set a breakpoint, start the program and check the "Debug Output Panel" in DILE. After starting the debuggee there should be a "BreakpointSetError" line in this panel and the breakpoint should have disappeared from the editor/Breakpoints Panel. If this is the case but the latter didn't happen then it must be a bug in DILE.
To avoid this problem:
1. Try to set the breakpoint somewhere else in the IL code. The first instruction of a method (IL_0000) is almost always hit.
2. Please, make sure that the code is really called. Try to set a breakpoint in one of the caller methods.
3. Check whether the breakpoint is really active (if it appears as an orange line in the IL code, then it's inactive).
Please, let me know whether any of these advices help.
First of all, thanks you for attention.
I just want to see execution before unhandled exception.
This exception occurs in assembly in dll everytime in the same place.
I run debuggee without breakpoints (BPs) and DILE show me the place,
where exception occur. Then i set several BPs in this method
before exception place. Including first line of this method.
This part of code definitely must be executed.
After run, exception throwed as usually. But BPs, setted before
this code not works. And there is no BreakpointSetError in Debug
After many tries, i was found, that (in my case at least) BPs
works in startup assembly only (.exe). And not works in .dll.
Then i set several BPs in Main method - it works fine. Some of them
cause BreakpointSetError (may be wrong place for BP), some of them
break execution. All fine.
But i never have success with BP in dll assembly.
No break, no BreakpointSetError.
Ouch, I'm afraid I know what's wrong.
Please try this:
Let's say, you have 2 assemblies, an .exe and a .dll (where you'd like to set the breakpoint). First, add the .dll to a new project in DILE and then add the .exe. The order is important. Now set the breakpoint in the .dll and run the .exe. I suspect that DILE will stop when the breakpoint is hit...
You might also try the opposite, so first add the .exe and then the .dll and now the breakpoint will not be hit. Am I right?
This is really a bug in DILE and I have just fixed this a few days ago (while working on the dynamic assembly debugging). Actually, I was planning to release a new version soon (no later than next week) and that will include the fix. If you send me an e-mail address to firstname.lastname@example.org then I can send you a copy of the new version. Though it's not tested completely yet... Or you can use the above described work around.
Please, let me know whether this really helps.
And thanks a lot for reporting this problem and helping to find the cause. :-)
Sorry, but the workaround you explained above not work for me. I played with add-to-project order and set Break if SetBreakError option (because while loading DILE generate many messages in Debug Output Panel and i have problem to find SetBreakError). But BP not works, DILE not stop at SetBreakError. Thank you for attention.
This is really bad news as this was the only way how I could reproduce the problem. :-(
Anyway, I've uploaded a new version of DILE (v0.2.2) and if you don't mind, I'd like to ask you to download it and check whether it helps. If not - and you have some time - then please send me either the assemblies (if this is possible) or a simple example (code/assembly) that would help me to reproduce this bug.
By the way, does the above described behavior happen only with some of those assemblies or with all?
Log in to post a comment.