I’m trying to debug some code i.e. trying to get the values of some parameters
public SqlDataReader GetAllCompaniesByType(int type)
{
SqlParameter[] sqlp = new SqlParameter[2];
sqlp[0] = new SqlParameter("@CompanyTypeID", type);
sqlp[1] = new SqlParameter("@AreaID", DBNull.Value);
try
{
return SqlHelper.ExecuteReader(Settings.GetConnectionString(), CommandType.StoredProcedure, "procExtCompaniesByCompanyTypeIDSelect", sqlp);
}
catch (SqlException sqlEx)
{
ErrorReporting.WriteExceptionToLog(Settings.GetErrorLog(), sqlEx);
return null;
}
}
but for some reason the debugger keeps detaching. It is not just this code but happening everywhere, and I cannot fix it. Is it an IIS issue or Visual Studio?
I found this was due to incompatibility with debugging between 64 bit and 32 bit. I forced visual studio to debug in 32 bit and this seemed to resolve my issues.