February 2007 - Posts

Reflector 5 Released

Lutz released Reflector for .NET 5.0

If you do any .NET development and you don't use Reflector for .NET then you are missing out. Scott posted a brief review of the new version. I think I'm most excited about the new analyze feature, it should come in handy.

Reflector for .NET
Reflector for .NET Add-Ins

Posted by puzzlehacker | with no comments
Filed under: , ,

Image File Execution Options

Every now and than while debugging I need to either determine when a dll/module is loaded or need to attach a debugger to a process at startup that is started outside a debugger. I know there are settings that exist to do this but I always seem to forget exactly what they are. So for future reference here the registry entries.

 

Force a break while debugging when a dll/module is loaded

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\<modulename.dll>]
"BreakOnDllLoad"=dword:00000001

Force a process to start under the Visual Studio Debugger

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\<processname.exe>]
"Debugger"="vsjitdebugger.exe"

 

Useful links:

Junfeng - Image File Execution Options
Greggm - Breaking when a module loads
Greggm - Inside 'Image File Execution Options' debugging
Oldnewthing - Beware the Image File Execution Options key

Posted by puzzlehacker | with no comments
Filed under: ,

Powershell version of cmd set

If you are like me and are just so used to typing set to list and set environment variables then you might find this script useful.

if (test-path alias:set) { remove-item alias:set > $null }
function set
{
	[string]$var = $args
	if ($var -eq "")
	{
		get-childitem env: | sort-object name
	}
	else
	{
		if ($var -match "^(\S*?)\s*=\s*(.*)$")
		{
			set-item -force -path "env:$($matches[1])" -value $matches[2];		
		}
		else
		{
			write-error "ERROR Usage: VAR=VALUE"
		}
	}	
}

Just add this script to your Powershell profile and you will be all set :)

PS: If anyone is interested I updated the Powershell Language definitions for CodeHTMLer, it now highlights more of the built-in stuff such as cmdlets and variables.

More Posts