4 ms·
Good luck debugging! Seriously. You can't attach a debugger to your DB.
by flerchin 6y ago
Good luck debugging! Seriously. You can't attach a debugger to your DB.
- vsareto 6y agoDBs can have debuggers and breakpoints, but they do not come anywhere close to something like Visual Studio debugging C# code. Of course, many programming languages also do not have a debugging quality-of-life compared to Visual Studio.
- TedDallas 6y agoEr ... SQL Server Management Studio is based on Visual Studio shell, and it does a fine job debugging stored procedures. I also code in C# and agree it also works well for that.
- bsg75 6y agohttps://www.pgadmin.org/docs/pgadmin4/development/debugger.html https://www.pgadmin.org/docs/pgadmin4/development/debugger.h... https://dbeaver.com/docs/wiki/PGDebugger/ https://dbeaver.com/docs/wiki/PGDebugger/ https://www2.navicat.com/manual/online_manual/en/navicat/mac_manual/DebuggerPGSQL.html https://www2.navicat.com/manual/online_manual/en/navicat/mac... https://www.cybertec-postgresql.com/en/debugging-pl-pgsql-get-stacked-diagnostics/ https://www.cybertec-postgresql.com/en/debugging-pl-pgsql-ge... Other platforms have options as well: https://docs.microsoft.com/en-us/sql/ssms/scripting/transact-sql-debugger?view=sql-server-ver15 https://docs.microsoft.com/en-us/sql/ssms/scripting/transact...
- throwaway_pdp09 6y agoIME I've never needed one. You get a copy of prod and test against that. SPs are typically short, even when they're long their functionality tends to be well defined, it's never been a problem for me. You certainly can and do add logging, this can be useful.
- mdoms 6y agoI don't know what industry you are in or what kind of data your users entrust in you, but "just get a copy of prod" is not an idea that would EVER fly in any organisation I have worked in. Developers do not get access to production customers' financial records, medical data or PII, ever.
- throwaway_pdp09 6y agoHands up, it's a fair point. I've worked with data sets that are mainly large aggregates of public data so security isn't an issue. It's the code that's carefully protected. One exception is having access to that data because I was working ON the prod server. Read that again. It was deeply uncomfortable to work like this. Very worrying every day.
- throwaway201103 6y agoIn those cases you have a set of test data that you use for development and testing. It's not like you can attach a Visual Studio debugger to production either.
- pjmlp 6y agoI do it all the time on Oracle, SQL Server and Informix. Better I can even optimize to native code, and still debug them.