Debug in VS2005

Any template questions or comments or suggestions

Debug in VS2005

Postby moebious on Sun Apr 09, 2006 3:05 am

Has anyone had any success with debugging gen scripts using VS2005? One thing that I noticed is that if you put the <%DEBUG%> thing in and System.Diagnostics.Debug.Launch() and then run MyGeneration in prompts for a debug session but when VSk5 opens to debug session it says there is no code to debug. if you click yes you can see the disassemlby. Not much help. Any Suggestions?
Trust the MoeBious Brand
User avatar
moebious
Sergeant
 
Posts: 24
Joined: Mon Apr 11, 2005 4:15 am

Re: Debug in VS2005

Postby mfreidge on Sun Feb 18, 2007 2:25 am

moebious wrote:It prompts for a debug session but when VSk5 opens to debug session it says there is no code to debug. if you click yes you can see the disassemlby.


I experienced the similar behavior.
I've also added System.Diagnostics.Debug.Break() in the places where I actually wanted to debug.
When I opened "Record Template Input" from MyGeneration Projecthe first time, it also didn't show source code, but when stopped on Break, I was able to see call stack and variable values.
Furthermore, if I opened "Record Template Input" for the same template instance second time, the source code was opened in some temporary cs file(started with something like $ZEUS$DEBUG) and full debugging features were available(unfortunately without Edit and Continue).

Anyway,is any settings will allow to see source in debugger at the first time?
Michael Freidgeim
Blog: http://geekswithblogs.net/mnf/
mfreidge
Corporal
 
Posts: 16
Joined: Tue Aug 01, 2006 3:21 am

Postby mike.griffin on Wed Feb 21, 2007 3:54 am

I usually choose just the lightweight CLR debugger when it prompts me, see if that helps.
User avatar
mike.griffin
Site Admin
 
Posts: 3290
Joined: Sat Apr 03, 2004 6:10 am
Location: Indianapolis, IN

Re:

Postby mfreidge on Thu Feb 22, 2007 2:26 am

mike.griffin wrote:I usually choose just the lightweight CLR debugger when it prompts me, see if that helps.

On my machine both VS 2005 and CLR debugger shows disassembly on the first run of the template from MyGeneration UI. If you keep the debugger open and start the template second time, debugger stops at
System.Diagnostics.Debug.Break()
and shows source code.
It is a workable behavior, if you know that you should run template second time.

Thank you for the tip to use lightweight CLR debugger, it loads quicker than VS.
Michael Freidgeim
Blog: http://geekswithblogs.net/mnf/
mfreidge
Corporal
 
Posts: 16
Joined: Tue Aug 01, 2006 3:21 am

I wonder.....

Postby jloux on Tue Oct 30, 2007 7:14 pm

I've tried using this method to debug with VS and all I can access is the disassembly. I cannot access the source code at all, there isn't even the temp files for when it's ran. Any ideas?

Also, when the template is ran the second time should the debugger be stopped and then the template re-ran or just let the debugger continue running?

Thanks in advance.
jloux
Lurker
 
Posts: 7
Joined: Tue Oct 30, 2007 7:06 pm

Re: I wonder.....

Postby mfreidge on Wed Oct 31, 2007 12:02 pm

I've recently used the same approach on a different machine(and on different job).
1.Added System.Diagnostics.Debug.Break() in the places where I actually want to debug.
2. Used MyGeneration Project to select template and open \"Record Template Input\"
3 At the first time, it didn't show source code, but when stopped on Break, I was able to see call stack and variable values.
4. clicked Continue, do not close debugger.
5. Open \"Record Template Input\" for the same template instance second time.
6. The source code was opened in some temporary cs file(started with something like $ZEUS$DEBUG) and full debugging features were available(unfortunately without Edit and Continue).
Michael Freidgeim
Blog: http://geekswithblogs.net/mnf/
mfreidge
Corporal
 
Posts: 16
Joined: Tue Aug 01, 2006 3:21 am


Return to General Template Questions/Comments

Who is online

Users browsing this forum: No registered users and 1 guest

cron