How to auto-re-compile with /debug option from inside DbgCLR.exe Debugger ?

  • Thread starter Thread starter Keith Clark
  • Start date Start date
K

Keith Clark

When I load a csharp program into the MS DbgCLR.exe debugger and trace it everything is fine the first time.
Assume now, I change somewhere a code statement in the source file (outside the Debug-IDE) without re-compiling it.

DbgCLR.exe recognizes that something has changed in the source file and pops up a warning dialog asking if
the new source should be used. If I click "yes" and re-start the debugging process from the beginning
DbgCLR.exe displays then the new source BUT uses internally the old debugging information !!!

In other words I need to re-compile the new source explicitely with a

csc.exe /debug mysource.cs

statement to update the mysource.pdb debug information as well.
Hmmm, I could imagine that there is an option in the debug IDB DbgCLR.exe where I can enable an option

"re-compile source with /debug flag before start".

But I didn't found such an option in the settings.

Do I really have to re-compile the source manually?
Is tehre at least a setting which warns me if source (*.cs) and debug *.pdb file do not fit together ?

Keith
 
Keith,

I don't believe that there is any such option. This would mean that the
debugger would have to have knowledge of the type of code that it is, and
know which compiler to invoke. This isn't to reasonable, IMO, and I would
be surprized if something like that was there.

Hope this helps.
 
Back
Top