

Ask HN: Do you use a debugger? - karamazov

If so, (or if not), for which languages?
======
yen223
When I work with C#, I use a debugger all the time. Learning how to attach a
debugger to a running process saves a lot of headaches in the long run.

On the other hand, when I work with Python, I rarely had to use a debugger.
Python's grammar is so simple that simply _reading_ through the code is
usually enough to spot most errors.

------
zamalek
Having been spoilt by the calibre of Microsoft debugging tools earlier on in
my development career it's one of the very first things I get working when
approaching new environments/languages. It's especially helpful when learning
a language as experimentation is often a lot quicker than RTFM.

------
shortlived
IF the problem lends itself to debugging then a hearty "YES!" is my answer.
Eclipse/Java is my debugger of choice but there are also fine standalone
debuggers like JSwat or even the command line debugger.

------
gurvinder
how can you not use debugger and program/find defects. I mean for sure you can
do print and alert, but that is highly inefficient way of debugging.

------
ZephyrP
No, I wrote my own debugger.

<https://github.com/zv/zdb>

For "serious" stuff, I have a .gdbinit file that makes GDB _much_ more
usuable, check it out if you have time.

<https://raw.github.com/zv/dotfilez/master/gdbinit>

------
jk
gdb. I work in system software, so cross platform debugger is what helps to
catch issues easily.

edit: gdb to debug asm and C code

------
gesman
Yes. Live, step by step debugging of fresh code is the best ever way to find
hidden bugs that are otherwise undetectable by tests.

------
room271
I (mostly) write Scala and have never used a debugger. I'm not aware of any of
my immediate colleagues who use one either.

------
patforna
For me, TDD, a REPL and the occasional console print statement almost
completely eliminates the need for a debugger. That being said, I probably
fire it up every couple of months when working on a java or .net project.
#java #scala #ruby #javascript #.net

------
codewright
Prolifically in Python, JavaScript, and Clojure (sorta. I find Ritz annoying.)

~~~
lifeisstillgood
Can you point to your favourite approaches (import pdb; pdb.set trace() in
console or wingide or ?

~~~
codewright
I have an emacs macro that redirects stdout and hooks in _ipdb_ , the i here
is important because it's an ipython wrapped pdb session. It's amazing.

JS is the usual Chrome debugger instrumentation.

Clojure is a mixture of REPL, println, and Ritz. Tbqh, Clojure needs an ipdb
equivalent. Ritz is really ghetto. I realize the REPL suffices for most people
but I'm accustomed to injecting my full programming environment dynamically
into my runtime, not having two disjoint realities.

------
smilliken
Bpython has a nice wrapper for pdb:
<https://pypi.python.org/pypi/bpython/0.11>

This is the nicest python debugger I've used.

------
gobengo
I'm surprised at how few frontend developers make use of JavaScript's
'debugger;' statement. I find it invaluable.

~~~
ianox
Especially when debugging JavaScript in an environment without any built-in
browser debugger. If you ever have to debug JavaScript running inside a .NET
WebBrowser control the debugger statement will help you keep your sanity.

------
mayankj08
Yes, I use debugger oftenly for GCC and I use GDB debugger for same.

------
raindrift
Yep! The Chrome debugger for js, and pry-debugger for ruby.

------
webdisrupt
With PHP...Xdebug which is incorporated in Netbeans IDE

------
nekitamo
OllyDBG every day, for x86 assembler :)

------
Irishsteve
But of course

------
kamaal
On very few occasions have I ever faced a need to use a debugger.

Generally those situations are places where print statements are not allowed.

------
stray
Of course!

Common Lisp's debugger, accessed via slime is the best thing since running
water.

Also a big fan of WingIDE's debugger for python.

------
incawater
Yes, I use debugger regularly.

