Julia Debugger - not enough attention

I think that the lack of a debugger for the Julia language is the main obstacle to using Julia in large production projects. Suppose you have to fix an unfamiliar code containing tens of thousands of lines that gives a bit different results between versions, inserting an intermediate prints is very slow process and no one will agree to use such “SW development technology”. There is a fundamental difference between projects developed by one programmer and large groups of programmers, between University projects and production projects.

1 Like

See Compiler work priorities?

Personally, I’d put the debugger in the first place.

1 Like

Yet people are using Julia in large production projects. I think that the “The Evolution of the Julia Community” part of the comment below is relevant here:

2 Likes

@vladimir, the problem that you are raising merits some attention but perhaps not in the sense that you are expecting.

This is an argument that I have heard times and times again against the language. Albeit it has grain of truth, it is in large part unmerited. I’ll start with some quick conclusions:

  • a debugger will not help in cases of bad engineering
  • a debugger in Julia would be a welcomed addition but one can manage very well without

I will try to elaborate in a combined manner my two conclusions:

First, if you see a project containing tens of thousands of lines that have to be debugged to correctly run the code, something went terribly wrong, regardless of the language. Code should be compact i.e. small, orthogonal (functionality not repeated across the code base) and transparent (easy to understand logically, semantically and I’d add through its documentation). So, even large codebases (tens, hundreds of thousands of lines of code) should have small ‘debuggable’ entities that are easy to understand and fix. This can be done in Julia directly in the REPL (Rebugger.jl is perfect for this and there are other packages that can help as well…). The REPL is the Julia debugger, at least in my conception, and a very advanced one indeed.

Julia is quite high level and one can write a lot of functionality in a relative number of lines (compactness). Moreover, most packages are relatively small, tested and easy to reason about (transparency). Maybe not well documented but one can get by if has a good grasp of the language itself and understands what the package is about (which may be difficult in itself). Multiple dispatch provides an extremely powerful (but not sufficient) mechanism for orthogonality.

Another good practice (in all programming languages) is to run unit tests with which one tests the actual functionality of (small) code blocks. This would help catch most bugs in the first place and point to the places that do not work if recent changes broke the code.

Not having a debugger has another colloquial ‘merit’ (feel free to disagree here, I am speculating): forces one to reason about the code and mitigate subconsciously for the lack.

Ofcourse, reality is another matter. Large codebases are inevitable as bad practices are. Unfortunately, in the situations you are referring to a debugger will not help as the code is not maintainable. Period. With a debugger you may fix the code (or a part of it, the current bug …) but this will not help at all one’s understanding of the code, preparing the next unfortunate guy for the task of debugging it or limiting the amout of resources necessary for the task.

The fundamental difference you mention about the size of the development group and industry and academia is (albeit practical) a contrived one which probably is based on bad examples on both sides. Good code transcends the social differences and objectives of either individuals or groups. A lot of good academia code is used in industry and vice-versa.

Hope this helps and stops you worrying about the debugger :wink:

4 Likes

“Yet people are using Julia in large production projects”.
Let’s suppose 25 programmers wrote 500,000 lines of Julia code (not large project) and support several application versions, hundreds installations. Is this possible without a debugger?
Why developers of MATLAB / Python / Java / C ++ / … need a debugger, but of Julia - not?

1 Like

There is no connection between how to write code correctly and the ability to debug code with a debugger.
We are in 2019, not in 1969.
Why not use good old 80x24 text monitors and punch cards?

Correctness can only go so far. This is weak rethoric that will not help in understanding neither the underlying problem at hand nor lead to any positive outcome.

Perhaps this may help, it is a good read.

As a side note, most of what you see around in terms of information technology systems as well as algorithms were developed on 80x24 monitors and puch cards. Stuff much more important than the things one debugs nowdays.

I don’t think this kind of tone is helping anything.

You are used to working with a particular tool, so you suppose that it is absolutely necessary. Stepping debuggers are useful for some purposes, but not all people find them essential — even for large projects. Structuring and documenting your code well is much more important in Julia.

Also, you may not realize how efficient Julia is as a programming language, but 500k LOC is a huge Julia project.

2 Likes

Julia Debugger:
the root cause is lack of resources ( money , funding, engineering manpower )

Julia :julia: is still young enough.

If you know of funding opportunities, please help! :heart:

see:

3 Likes

“As a side note, most of what you see around in terms of information technology systems as well as algorithms were developed on 80x24 monitors and puch cards. Stuff much more important than the things one debugs nowdays”
I really agree with every word above but discussion about necessary of a debugger says about zero experience in developing and supporting large code bases :slight_smile:

It is not the size of the codebase that matters but the size and quality of the parts that one focuses on at a specific point in time. In what language are these codebases that you are refering to written ?
Your problem seems to be not the large codebase but the quality of the code. In any case, writing the same code in Julia and expecting it to work (assuming that there is a Julia debugger) will not solve anything in this case, it will just shift the context of the problem from one language to another.

1 Like

Sure there is a point of project bloat where a debugger is necessary. But its going to be extremely rare to hit in scientific applications. We mostly need to be writing software that can be easily understood by other researchers, not 500k behemoths.

In smaller projects a debugger is of course still occasionally useful , it’s just not desperately needed by many people here compared to other things in the priorities list.

2 Likes

Please not this again. This was debated to death at How do you use debuggers?. Some people can’t live without debuggers, some people don’t use them at all, and there really isn’t much point for one side trying to convince the other that they do/don’t need a debugger. Julia devs have stated that a debugger is on their radar, but that this is highly non-trivial due to the dynamic nature of the language, there are other features/bugs that need developing, and there is a very limited amount of people able and available to do such work. Unless somebody with the right skillset and availability is willing to devote the time to do it, or somebody has a cache of money to pay such a person, this kind of discussion is not going to be very productive.

16 Likes

Thank you for pointing to everyone the futility and the redundancy of the discussion as well as the unproductive ways in which we choose to allocate our own personal time.

Let’s summarize:
Is Julia a great language?YES
Is Julia ready for scientific and small production projects use - YES
Can Julia be considered as a serious alternative for MATLAB/Python without debugger?

Not for real, large production projects.

Whether you want to use Julia is for you to decide. But arguing that it isn’t “serious” unless it contains X is probably the least productive way to get X. There are plenty of programmers here using Julia in daily work, so dismissing the language and the ecosystem in their current state is unlikely to convince them about anything.

Also, keep in mind that, unless you are willing to sponsor development of a debugger, asking for one is effectively asking people to contribute time and effort to it. If I were to do something like this, I would probably use a much, much different tone. But YMMV.

7 Likes

Is a Debugger very important for Julia language? Yes
Do the authors of Julia want to develop a debugger? Yes
Is there enough resource to do this currently? No
:grinning:

3 Likes

I agree with everyone, except for the fact that there is a gap between Julia’s real readiness to production development and what is promised … It takes time to figure it out.

1 Like