Thread overview | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
November 09, 2014 Live without debugger? | ||||
---|---|---|---|---|
| ||||
I know that a lot of people are using for programming tools like Sublime. I am one of them. But if for very simple code it's ok, how to write hard code? Do you often need debugger when you are writing code? For which tasks debugger are more needed for you? |
November 09, 2014 Re: Live without debugger? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman Attachments: | On Sun, 09 Nov 2014 08:26:57 +0000 Suliman via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote: > Do you often need debugger when you are writing code? almost never. > For which tasks debugger are more needed for you? inspecting coredumps. |
November 09, 2014 Re: Live without debugger? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman | Am 09.11.2014 um 09:26 schrieb Suliman:
> I know that a lot of people are using for programming tools like
> Sublime. I am one of them. But if for very simple code it's ok, how to
> write hard code?
>
> Do you often need debugger when you are writing code? For which tasks
> debugger are more needed for you?
All the time, it is the workaround for exploratoring programming when a REPL is not available.
Smalltalk and Borland environments spoiled me in terms of what to expect from developer productivity tooling.
I only skip on the debugger for tracing down issues that can only be tracked down in production systems, where plugging a debugger would cause Heisenbugs.
As for what I use them:
- REPL like interactivity
- Visual displaying relationships between processes/tasks
- User friendly representation of data structures
- Conditional breakpoints depending on expressions and log events
- Forcing error conditions without changing existing code
- Break on core dump/application crash.
--
Paulo
|
November 09, 2014 Re: Live without debugger? | ||||
---|---|---|---|---|
| ||||
Posted in reply to ketmar | On Sunday, 9 November 2014 at 09:14:14 UTC, ketmar via Digitalmars-d-learn wrote:
> On Sun, 09 Nov 2014 08:26:57 +0000
> Suliman via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com>
> wrote:
>
>> Do you often need debugger when you are writing code?
> almost never.
>
>> For which tasks debugger are more needed for you?
> inspecting coredumps.
Pretty much this for me too. I wish I could make more use of it, but the best debugger I've found is GDB, which still seems far from optimal for D. It can at least give you an idea of where the core dump was triggered.
|
November 09, 2014 Re: Live without debugger? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman Attachments: | On Sun, 09 Nov 2014 08:26:57 +0000 Suliman via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote: > Do you often need debugger when you are writing code? besides, it's very hard to write code in debugger. even 'ed' is better for this task. ;-) |
November 09, 2014 Re: Live without debugger? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman | On Sunday, 9 November 2014 at 08:26:59 UTC, Suliman wrote: > I know that a lot of people are using for programming tools like Sublime. I am one of them. But if for very simple code it's ok, how to write hard code? > > Do you often need debugger when you are writing code? For which tasks debugger are more needed for you? I mainly use Vim for writing D code and rarely rely on a debugger nowadays because to be frank none really worked in the past with D. Recently however, D has made strides forward in GDB compatibility (thanks to Iain Buclaw, et al) and i find it works really well using a nice GUI frontend. I personally use Affinic Debugger GUI[1]. Like you say sometimes you need to use a debugger when writing 'hard' code to find where that crash is or just to follow the logic. To be honest it is a shock using any language without a debugger as i've been spoilt rotten by Visual Studio in the past but with D i manage with what i've got just fine. [1]: http://www.affinic.com/?page_id=109 |
November 10, 2014 Re: Live without debugger? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman | On Sunday, 9 November 2014 at 08:26:59 UTC, Suliman wrote:
> I know that a lot of people are using for programming tools like Sublime. I am one of them. But if for very simple code it's ok, how to write hard code?
>
> Do you often need debugger when you are writing code? For which tasks debugger are more needed for you?
I don't use a debugger for D. Most of the code I deal with is my own code anyway so I usually have a good idea of where things go wrong when they go wrong. But I think that it is also down to D being debug-friendly by nature (and I usually insert simple "debug" statements and / or unittests). In my experience, it doesn't even need an IDE. I think that's a sign of quality.
|
November 11, 2014 Re: Live without debugger? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris | On Monday, 10 November 2014 at 10:50:49 UTC, Chris wrote:
> On Sunday, 9 November 2014 at 08:26:59 UTC, Suliman wrote:
>> I know that a lot of people are using for programming tools like Sublime. I am one of them. But if for very simple code it's ok, how to write hard code?
>>
>> Do you often need debugger when you are writing code? For which tasks debugger are more needed for you?
>
> I don't use a debugger for D. Most of the code I deal with is my own code anyway so I usually have a good idea of where things go wrong when they go wrong. But I think that it is also down to D being debug-friendly by nature (and I usually insert simple "debug" statements and / or unittests). In my experience, it doesn't even need an IDE. I think that's a sign of quality.
What this guy said. I currently have a 20,000+ lines project and I haven't used a debugger once and have only done manual compiling; yet I haven't encountered any bugs or errors I haven't been able to fix within a short time; without going through a lot of code. I think I would probably have spend longer fixing bugs and errors using a debugger, breakpointing than simply analyzing code myself.
All code is written by myself though and everything is documented, so I have a pretty good view over the project itself and anybody who decided to use it should have no problem navigating it either.
Hands down to D for being as it is.
|
Copyright © 1999-2021 by the D Language Foundation