Visual Studio test machine debugger - c#

I have a mixed C# and CLI C++ project that is throwing an exception from C++ on Windows XP test machines. I'm wondering if anyone knows of a light tool (short of installing Visual Studio itself) that I could install on the test machine to identify the location of the exception.
Thanks in advance

Install the Windows Debugger. It is free, and can be found at: http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx
There are many sites and books detailing how to use Windows Debugger. Microsoft provides the following site for reference: http://msdn.microsoft.com/en-us/library/windows/hardware/ff551063(v=VS.85).aspx
http://windbg.info/doc/1-common-cmds.html has a list of common WinDbg commands.
It is very useful, can be installed on test machines, and can be used to read minidumps, unlike Visual Studio 2008 and older versions.
To generate a dump at any time, start task manager on the test machine, right click on the application you want a dump from, and select "Create Dump File".
If you have a dump or minidump from your application, you can use the WinDbg.exe (Windows Debugger) to get a stack trace using the command "!analyze -v".

Dont forget the remote debugger! I find this ideal, assuming you can connect to your dev box over the net. If the dev box is in a different room, use remote desktop from the test machine.
Instructions here
And see my answer here with more tips

Related

How to export the .NET project having connected with database?

I have completed my .net project using visual studio 2012. How can I export my project so that I can run it on other pc too. The problem is that the database is not working on others pc bt perfectly working on my lappy. Why is it so and how can I solve this problem?? Please anybody help me out....
Get this situation at work fairly regularly as we have multiple instances of SQL Server and MySQL (Not so many of these) and deploying then testing the program can be quite laborious and any change in the deployment means you have to go back to the original, change and re-deploy.
What I would do is install visual studio express, or visual studio 2012 shell on the local machine where the deployment is going to take place and debug there. If it is a corporate environment where licensing is an issue, installing visual studio express will mean that you do NOT have to purchase a license and therefore not incur cost.
The other situation is that you connect from your local machine to the MySql database but you'll have to open firewall ports which could get messy and, testing the program will not give you accurate performance results as your accessing a database over a network thats not configured for it.
There are other options such as using an attached database but again, gets messy with you changing the structure of your program.
My advice is go with the visual studio express solution...

How do i debug C# windows form applications in production?

I developed a small app used to synch data between a local computer and an online web service.
In the testing environment, using visual studios 2012 express debug mode, I'm not able to reproduce a bug that is causing the application to crash.
I've tried logging activity manually by writing data to .txt file to give me a frame of reference, but I still can not determine where this bug is occurring.
Are there any tools available for debugging this app while in production mode?
If you can start a process on the remote production machine, the simplest thing to do in this kind of scenario is using the VS remote debugger.
This way you'll have a full debugging context with much more information than with simple logging; the debugging experience is (almost) the same as with local debugging.
It's a shame this tool is not widely known because it can literally save you hours or even days for tricky bugs.
Try logging stacktrace a.s.o. in AppDomain.UnhandledException event handler.
Furthermore it's possible to trace all function calls utilizing aspect oriented programming with PostSharp. There are examples on the PostSharp webpage.
We use Microsoft Enterprise Library to log and email the stacktrace to us any time an unhandled exception occurs.
Simply use NBug library which can catch unhandled applications and send a bug report to an e-mail address that you specify.
Yeah, the problem could be related to environment or the version of the software your debugging is not the same as production. So what you ideally want is to debug the live version against the same source code version and debug symbol files.
There are numerous articles on the net regarding how to do this like this one and this one. I read one once that showed you how to not only setup a symbol server correctly with TFS but on how to debug an production exe and VS would load the correct symbols for that version from the symbol server and the source code version from TFS... but alas i cannot find it.
The remote debugging an logging is all great essential tools but when you're at the place you're at now - the right version of debug symbols and source code would probably help you more.

C# Form Automatically closes when visual studio is not installed

I wrote an application with .Net4 and C# and also deploy it to user system with install shield.
After I changed few lines of code, one of my Winforms automatically disposes** without error in client system which has .Net4 but does not have Visual Studio installed.
All prerequisites are installed and it used to work fine...
If I install Visual Studio in client's system, it will work perfectly.
I tried to debug it but visual studio does not find any exception.
Please help
Form may contain components that are not present in client's system.
It depends upon way in which you are deploying your application.
General way is:
Install framework.
Copy-Paste debug folder to client's system.
Bring shortcut to desktop.
OR
Simply publish the application.
Copy paste publish folder to cliet's System.
Execute publishing setup.
Bring shortcut to desktop.
It works in this way.
Hope its helpful
You wrote on the user machine .Net 4 Client framework is installed. Try to uninstall it and install full .Net 4 framework (here is a link to MS download site).
Those 2 lines that you have added may now reference the features that are available only in full .Net 4 installation. (Unfortunately you did not post those lines so we can only guess what the problem is).
With Visual Studio full .Net 4 is installed and maybe because of this your app starts to work after VS installation.
See Difference between .NET 4 Client Profile and Full Framework download for more details.

Remote debugging in Windows Embedded

I'm moving from Windows CE 6 to Windows Embedded Standard 7 for a project and am wondering how remote debugging of .Net apps works with Windows Embedded target devices. In CE with VS2008 and ActiveSync (USB), I can hit F5 and my app is automatically deployed to the target device and executed so I can step through my breakpoints just like I would if I were debugging locally.
Is there an equivalent remote debugging solution for Windows Embedded debugging? A quick glance through the Visual Studio "Remote Debugger" documentation makes the whole thing seem a lot clunkier/less integrated. Is there an easy way to debug applications on target devices running Windows Embedded like I would with CE?
Thanks,
Ben
I only have experience doing this over standard network interfaces on a Embedded Std7, but I guess the approach using an ActiveSync connection is exactly the same (as ActiveSync devices like my cellphone turn up under 'My Computer'); in short:
suppose the Embedded device is on \\Embedded
share a directory on the Embedded device, say 'temp'
start the remote debugger client on your device
point the output directory of your VS project to \\Embedded\temp
set the options for your project to remote debugging on \\Embedded
hitting F5 will build the exe, put it in \\Embedded\temp and start debugging it
Look here for the document that got me started.

mono : Is remote debugging possible with monodevelop?

mono : Is remote debugging possible with monodevelop? I want to remote debug a console application running on a remote RHEL server with monodevelop installed on CentOS development machine. Is this possible with monodevelop?
This could actually be done with the Soft Debugger.
Currently, no. This is not possible. I have heard the MonoDevelop team mention they would like this feature in the future, but I do not believe they have a schedule yet for when they will get to it.
The new Soft Debugger and the MD addin do support remote debugging but there's no way to set up the debugger session from within MD (except for iPhone apps).
Also, despite its name, the MeeGo addin supports remotely running and debugging apps on any GDM-based Linux machine over SSH. It could easily be modified to support machines without X, or running different project types.
http://anonsvn.mono-project.com/viewvc/trunk/monodevelop/extras/MonoDevelop.MeeGo/README.txt

Categories

Resources