StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Debuggin a Type EditorExpand / Collapse
Author
Message
Posted 07/05/2007 10:09:54 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 3:03:43 PM
Posts: 372, Visits: 2,486
It's late so gonna be short but I am trying to set up a type editor for a custom property but I got some wires crossed somewhere. Problem when I try to use that aforementioned pain in the neck property V.S. just quits.. none of the usual hints like "hey idiot you cant do that" or anything. Any pointers on how to debug this>?
Post #10014
Posted 07/05/2007 10:42:42 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 3:03:43 PM
Posts: 372, Visits: 2,486
I found the problem, It ended up that I had a type cast problem. Still is there is a better way than just getting lucky and finding the issue?
Post #10015
Posted 07/06/2007 9:52:41 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:23:29 PM
Posts: 4,887, Visits: 4,871
LOL....yeah, that is the life of a type editor developer   VS snuffs most type editor exceptions so you either get nothing....or blown out.  There is a way to debug a type editor though....set your project to run an external program on debug (this can be for a class library as well).  Right-click your project and go to properties.  Select the Debug tab.

Next, tell it to start up the VS devenv.exe for the external program.  Now when you run your program in debug (Ctrl+F5) it will launch another session of VS.  But your project with your type editor will break anywhere you place a break point and you can then debug your type editor....very nice trick

Post #10023
Posted 07/06/2007 10:35:07 AM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 3:03:43 PM
Posts: 372, Visits: 2,486
Trent that's the ticket !!

I was hoping that there would be some way to debug it besides >>Try to set property >> Crash Visual Studio >> Stare Blankly at screen >> Restart Visual Studio >> Stare Blankly at code>> Wait till Eyes are blurry and crossed >> try something  >> Try to set property again >> Crash Visual Studio >> Stare Blankly at screen>> you get the picture

I also noticed that when I make a change in the editor the change would not show unless VS is restarted.

 I would guess that setting it up to run as you showed will eliminate that issue in the spawned instance of VS but I still would need to remember to restart the main instance once I am finished debugging.

Thanks alot.

Paul

Post #10029
Posted 07/06/2007 1:04:45 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:23:29 PM
Posts: 4,887, Visits: 4,871
LOL....yup...been there

I also noticed that when I make a change in the editor the change would not show unless VS is restarted.

If you have your assembly in the GAC then the assembly is cached within VS and will not reload.  Also, there are other times the the assembly will be cached with VS in the AppDomain and you have to get out and come back in for it to work.  When it launches the devenv.exe, it will load the new assembly so you won't have this problem when testing.

Post #10035
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 5:16am

Powered by InstantForum.NET v4.1.4 © 2009
Execution: 0.125. 12 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.