SpriteHand
Module Border
  Debugging a hung WindowsForms app
Module Border
Location: BlogsAndy's Blog    
Posted by: host 9/8/2005 11:51 AM

I've had to do this just a few times in the past several years, and I keep forgetting to blog it... but here goes. If you have a hanging issue in your application, it's easy to debug by attaching to the process through VS.NET. But what if the hanging only happens on a deployed machine without VS.NET installed? You can use cordbg.exe as follows...

- copy the below files from a developer's machine (with VS.NET or .NET SDK installed) to the machine with the issue
 msvcr71.dll
 msvcp71.dll
 msdis140.dll
 cordbg.exe.config
 cordbg.exe

- the user should have a hanging .NET app currently running. If not, have them run the app and recreate the problem.

- find the PID for the app by looking in task manager (you many need to add the PID column in to view it by selecting View/Select Columns from the menu)

- start cordbg.exe from a command prompt.

- attach to the .NET process... at the (cordbg) line, enter
 a {pid}
 where {pid} is the process id you found from task manager

- you can enter "sh" to show the source code lines of the current breakpoint.

- List the loaded modules in the process using the l mod command.
 The command line is shown below:
 (cordbg) l mod

- Display and examine the call stack trace for all current threads using the *w command. This should show what line the process is hanging on (assuming the PDB file is present for the hung assembly). Specify an argument of 200; this lists up to 200 levels of stack trace.
 (cordbg) *w 200

- Now detach from the process, and quit the debugger:
 (cordbg) de
 (cordbg) q

Permalink |  Trackback

Title:
Comment:
Add Comment   Cancel 
Module Border Module Border
Module Border
  Blog_List
Module Border
Module Border Module Border
Module Border
  Subscribe
Module Border

RSS

Module Border Module Border
Module Border
  Diversions
Module Border

DESTROY ALL INVADERS
A scrolling shooter game where the objective is to destroy the invading UFO's flying over a neighborhood of your choosing. Imagery provided by Microsoft Virtual Earth. Created using Silverlight 2.
PLAY IT

INFO AND CODE



HOOK SHOT
This little basketball game was submitted as an entry to the TeamZoneSports Silverlight Contest. Created using Silverlight 2 and the Farseer Physics engine.
PLAY IT

INFO AND CODE



SORT THE FOOBARS
A game where you need to sort the good foobars from the bad ones. Created using Silverlight 2 and the Farseer Physics engine.
PLAY IT

MORE INFO



POLYGON PHYSICS DEMO
A demo showing polygon physics where the user draws physics objects with the mouse. Created using Silverlight 2 and the Farseer Physics engine.
PLAY IT

MORE INFO



SILVERLIGHT ROCKS!
Destroy the asteroids before they destroy your ship! Created using Silverlight 2.
PLAY IT

INFO AND CODE



FISH GAME
A simple game of harpoon-the-fish. Written using the AJAX Sprite Toolkit.
PLAY IT

INFO AND CODE

Module Border Module Border
Module Border
  Search_Blog
Module Border
Module Border Module Border
Module Border
  Blog_Archive
Module Border
Module Border Module Border
Copyright (c) 2008 andy.beaulieu.com - Login