diff --git a/pgadmin/debugger/ctlCodeWindow.cpp b/pgadmin/debugger/ctlCodeWindow.cpp
index 5db7178..c6098f6 100644
--- a/pgadmin/debugger/ctlCodeWindow.cpp
+++ b/pgadmin/debugger/ctlCodeWindow.cpp
@@ -1067,12 +1067,20 @@ void ctlCodeWindow::displaySource(const wxString &packageOID, const wxString &fu
 		// Now erase any old code and write out the new listing
 		m_view->SetReadOnly( false );
 
-		// Strip the leading blank line from the source as it looks ugly
+		// Get the source. Ignore any CRs.
 		wxString src = codeCache.getSource();
 		src.Replace(wxT("\r"), wxT(""));
 
+		// Before PostgreSQL 9.1, the server ignored an initial newline
+		// when calculating line numbers. The line numbers of what we display
+		// has to match the server's numbering, or all the highlighting and
+		// breakpoints are off, so if we're connected to a server older than
+		// 9.1, strip the initial newline from the display.
 		if (src.StartsWith(wxT("\n")))
-			src = src.AfterFirst('\n');
+		{
+			if (!m_dbgConn->BackendMinimumVersion(9, 1))
+				src = src.AfterFirst('\n');
+		}
 
 		m_view->SetText(src);
 
diff --git a/pgadmin/schema/pgDatabase.cpp b/pgadmin/schema/pgDatabase.cpp
index 93b8672..66ce7f1 100644
--- a/pgadmin/schema/pgDatabase.cpp
+++ b/pgadmin/schema/pgDatabase.cpp
@@ -1036,7 +1036,18 @@ bool pgDatabase::CanDebugEdbspl()
 	if (GetServer()->GetSuperUser())
 	{
 		// Check the appropriate plugin is loaded
-		if (!ExecuteScalar(wxT("SHOW shared_preload_libraries;")).Contains(wxT("plugin_spl_debugger")))
+
+		// Before EDBAS92, there was a separate library for SPL and PL/pgSQL.
+		// Starting with 9.2, EDB uses the community version of pldebugger,
+		// and support for both languages is built into plugin_debugger.so
+		wxString library_name;
+
+		if (server->GetConnection()->EdbMinimumVersion(9, 2))
+			library_name = wxT("plugin_debugger");
+		else
+			library_name = wxT("plugin_spl_debugger");
+
+		if (!ExecuteScalar(wxT("SHOW shared_preload_libraries;")).Contains(library_name))
 		{
 			canDebugEdbspl = 1;
 			return false;
