How to debug a custom activity designer? - visual-studio-2010

I have a custom workflow activity for which I've written a designer. Unfortunately, when I drag my activity from the toolbox onto the workflow designer surface, I get an error ("Could not generate view for ..."). I suspect that some code in my designer (which is running inside of Visual Studio) is at fault.
How can I debug the code in the designer? Since it normally runs inside of VS, I'm not sure how to proceed.

You can start a second copy of VS2010 and attach the debugger to that instance to debug your designer.

Related

VS axml Edit and Continue in Xamarin.Android Projects

Is there any way to edit the .axml file of a Xamarin.Android project file, while debugging and see the updated changes live? Or is there any workaround for this?
I am coming from WPF and UWP, where we have the Xaml Edit and Continue feature, where you could edit the .xaml file while debugging and the changes would update the debug application in real time.
I know there is no such feature as .axml Edit and Continue in Visual Studio, but in WPF, before xaml edit and continue existed I was using the snoop workaround, where you could attach with another application to you debug application and change controls/ View Models properties live. The changes we're not persisted to the .xaml file, but it was enough for UI debugging.
The best workaround I could find is to inspect the application while debugging with Xamarin Inspector.
This won't update the .axml file, but for debugging purposes it is good enough.
Here's [minute 5:30] a short demo video on how it works.

How to programmatically drop a file on a Windows app?

I'm looking to have a particular running instance of Visual Studio open a file. Is there a way I can fake a drag-drop operation via code from my app to Visual Studio? Same as if I were to drag a file from Explorer into VS.
I realize I could probably do this easier as an add-in or macro but I'm looking to make this work purely from a script.
You could try sending a WM_DROPFILES message to the Visual Studio window.

Autofill Watch data with values when debugging in Visual Studio 2010?

When I debug my web project I start with an empty Watch window and I have to add all data myself.
When a friend of mine showed me how to debug with Visual Studio he got all Watch values automatically filled in the window.
How do I get my Visual Studio to autofill my Watch window with all available values?
Your friend might have shown you the Locals window or the Autos window. They are both available through the Debug window, and automatically show you the relevant variables. The Watch window, on the other hand, is supposed to come up empty and let you fill in expressions by yourself.

Visual Studio output window- what goes there and why?

Can someone please explain to me what goes to the Output window in VS? Where do the messages there come from and do they have other use other than for debbuging?
Thanks.
The Output window is a set of text panes that you can write to and read from. Visual Studio defines these built-in panes: Build, through which projects communicate messages about builds, and General, through which Visual Studio communicates messages about the integrated development environment (IDE). Projects receive a reference to the Build pane automatically through the IVsBuildableProjectCfg interface methods, and Visual Studio offers direct access to the General pane through the SVsGeneralOutputWindowPane service. In addition to the built-in panes, you can create and manage your own custom panes.
Output Window (Visual Studio SDK)
This panel shows the actual info, that is spit from your application to the console (no matter debug or run mode). Also building, rebuilding and cleaning your project is described as operations there.
Check F1 for more info ;)
By default it either shows output from the build process, or debugger output. You can use OutputDebugString to display text in the output window while debugging.
There's not much else you can do with it without using an Add-In for Visual Studio.

Visual studio 2005 "Object Test Bench" popup when debugging

When debugging a project in Visual Studio 2005, I have recently noticed a brief appearance of the "Object Test Bench" window. This window appears and then disappears after less than a second and does not look like the normal "Object Test Bench" window one sees when not debugging, as it looks like this:
alt text http://www.beok.co.il/images/ObjectTestBench.jpg
I would like to stop this window appearing and have tried the following:
Closing all Object Bench Test windows when not debugging
Resetting Visual Studio to default settings (devenv /ResetSettings)
Any other ideas?
Migrated? Hmm no code in this question. Anyway is the Object Test Bench perhaps open, but docked, so it pops up when the IDE state changes?
More info on the OTB on MSDN here :)
Edit: Here is what my VS 2005 OTB looks like.
alt text http://i.imagehost.org/0989/otb.gif
I also have the same problem. I once had JetBrain's Resharper 4.5 installed. I uninstalled it after my trial expired, and I think that's when I noticed the Object Test Bench popping up when I debug.
Did either/both of you have Resharper or any other Visual Studio add-on installed/uninstalled before this problem?
Related link on stackoverflow
I had what may be a similar problem: not just the Oject Test Bench, but also Breakpoint, Call Stack, and other windows popped up all over whenever I ran in Debug mode. It started during a project with a single page containing several (probably incompatible) jQuery scripts.
What worked for me was to click on Window -> "Auto Hide All", then again on Window -> "Reset Window Layout". That seemed to resolve it.
Go to on Window -> "Auto Hide All", after go on Window -> "Reset Window Layout". That will resolve the problem it.

Resources