-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: NUnit debug step-through using Proxies
PostPosted: Tue Jan 10, 2006 12:33 am 
Newbie

Joined: Sat Oct 15, 2005 3:30 am
Posts: 17
Hi,

I am using VS2005 (.net 2.0), and I am having a problem debugging into an NUnit test that is working with Proxies.

If I have the following code:

NHibernateWrapper wrapper;
ISession session;
wrapper = NHibernateAccessor.CurrentWrapper;
session = wrapper.ActiveSession;

District d = (District)session.Load(typeof(District), 1);

Assert.AreEqual("Bundaberg",d.DistrictName);

Put a breakpoint on the Assert.AreEqual line, and then attempt to F10 Step-Over the line, the NUnit GUI show the test as failed (text in the status bar but no red or green bar), and the IDE sits there in a ready state but without any ability to coninue stepping through code or investigate.

It seems to fall over because d is still a proxy at that point.

Note if I set a Breakpoint to somewhere after this Assert line (eg after the real object has been loaded, everythig is fine.)

Has anyone else had this issue?

Cheers,

Adam.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 10, 2006 4:29 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Code for proxies is generated dynamically at runtime, and Visual Studio has problems debugging such code.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.