zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
35.32k stars 1.79k forks source link

Build and Debug support #5065

Open WeetHet opened 1 year ago

WeetHet commented 1 year ago

Check for existing issues

Describe the feature

In most of today's code editors there is support for building tasks and debugging/launch support. This gives better reliability on the editor and reduces terminal usage. This is also just so much more comfortable. I think that first LLDB and Python debuggers should be introduced alongside with shell build tasks

If applicable, add mockups / screenshots to help present your vision of the feature

See: VSCode Build/Debug, JetBrains IDE's debug support

JosephTLyons commented 1 year ago

Going to group this together with the code runner issue:

Kethku commented 1 year ago

I looked into vscode's task.json file format and I think we should build support for it. Its general purpose, used frequently today, and handles a lot of corner cases pretty well.

https://code.visualstudio.com/docs/editor/tasks

WeetHet commented 1 year ago

Speaking of that, shouldn't you also implement debug support? It will help a lot

luolong commented 1 year ago

I second this feature request.

An ability to run builds either manually or automatically based on some editor events, execute tests (with feedback on test failures) and run arbitrary shell scripts (or code snippets as mentioned in related "Code runner" issue), would be immensly helpful.

WeetHet commented 1 year ago

I just don't seem to understand why this, essential thing is not even considered by masses (well, we still don't have replace feature, so maybe that says something)

natsuboy commented 1 year ago

I think build, run, and debug are all core features.

sonereker commented 1 year ago

Debugging support for especially Go 👍🏼

WeetHet commented 1 year ago

Maybe we should try to popularise this issue among other people so we would have more support?

aexvir commented 1 year ago

I'll mention my own issue for this, as it's the oldest one and it already has a bunch of 👍🏻 https://github.com/zed-industries/zed/issues/5307 it was covering mainly debugging through the support of dap servers, so no mention to building, but everyone who's interested on debugging should probably consolidate its reactions to that one

sheikalthaf commented 1 year ago

@JosephTLyons this one is very important feature which is required by default. Please Include this also as part of top ranking issues. So that i get attention from other developers also

hovsater commented 1 year ago

@JosephTLyons this one is very important feature which is required by default. Please Include this also as part of top ranking issues. So that i get attention from other developers also

Top ranking issues are based on number of thumbs up. Currently it’s the top 20 per core-label. This issue will automatically get there when the interest is high enough.

WeetHet commented 1 year ago

@JosephTLyons this one is very important feature which is required by default. Please Include this also as part of top ranking issues. So that i get attention from other developers also

Top ranking issues are based on number of thumbs up. Currently it’s the top 20 per core-label. This issue will automatically get there when the interest is high enough.

I just don't understand how this is considered just an "enhancement" and not a core feature?

hovsater commented 1 year ago

The label "enhancement" is used both for enhancements/features, so don't read too much into it. 🙂 The best way for the community to signal the importance of a given feature right now is by add your 👍 to the issue.

WeetHet commented 1 year ago

The label "enhancement" is used both for enhancements/features, so don't read too much into it. 🙂 The best way for the community to signal the importance of a given feature right now is by add your 👍 to the issue.

You can look at the problem this way, but that means that PHP support is more valuable than custom LSP support, which is obviously wrong, because latter is the superset of the former

jansol commented 1 year ago

Some of us just want a fast & sleek code editor with some navigation helpers, not a fully integrated Developer :registered: Experience :tm:

Debugger integration might be a key feature for you but for like half of my current projects it's either not useful to begin with or not feasible to set up in any IDE.

iamnbutler commented 1 year ago

Labels are 100% an organizing mechanic and not a statement of importance or sequencing. Don't read into them too much.

Build & Debug hasn't been built because the team doesn't really use them – When the right combination of people want it, and it makes sense for us to build sequencing-wise compared to other things, it will get built.

@JosephTLyons we might want to consider merging this with zed-industries/zed#5307 or group them?

gcdsss commented 10 months ago

I'm looking forward to having debug, launch, and task features. Having both VS Code and PyCharm open with multiple projects consumes too much resources and it really slow. 👍

smitbarmase commented 9 months ago

Where can we track progress for this?

MilanVilov commented 8 months ago

This would be quite an important feature for everyone working on larger codebases with good specs coverage. On the current Rails project we have around ~7500 specs, and we use debugger with RubyMine on daily basis, either to actually find the bug or for better understanding of the domain process. It is one of the most selling points of RubyMine for Ruby/Rails development and probably the main reason I am paying the licence every year, it speeds up the development.

This was also a core functionality of the VisualStudio while I did .Net development and it still is. For me the main difference between lightweight code editors and the IDE I use for everyday work is high quality debugger.

It would be awesome if a great tool like Zed would have couple of these grade 1 IDE features integrated as part of the core functionality.

MilanVilov commented 8 months ago

I'm looking forward to having debug, launch, and task features. Having both VS Code and PyCharm open with multiple projects consumes too much resources and it really slow. 👍

I am found myself using Zed + RubyMine couple of times, as I really wanted to migrate to Zed, but lack of debugger is just too big of an issues, so I went back to RubyMine until this is implemented.

smitbarmase commented 7 months ago

Only build task runner is stopping me from switching to Zed.

majd-asab commented 6 months ago

Only build task runner is stopping me from switching to Zed.

same, but I'd also love a debugger

emil14 commented 4 months ago

This is the reason why I won't switch from VSCode :-(

jansol commented 4 months ago

Since there's a huge influx of new people: issue popularity is being tracked programmatically based on the :+1: reactions to the OP of each issue. (this would probably deserve a pinned notice at the top of the issue tracker)

"me too" comments do not contribute to the popularity count, they only send out unnecessary notifications to a lot of people.

WeetHet commented 3 months ago

@JosephTLyons, what do you think about creating a tracking issue for this feature and closing this issue for comments?

karmops commented 3 months ago

This is not the focus of this project, I believe. Their previous project doesn't have a debug feature on it. Then, we need other projects on top of this(like: zedVsCode) to create a more feature-rich set for development. My guess... I hope to be wrong.

xushuhui commented 3 months ago

I think this is very important for zed . all developer need debug,I cant understand reason zed no support. I must open vscode when I debug, and write code in zed .

how to custom my code snippets ?

MikeChristensen commented 3 months ago

Without the ability to debug and run things, Zed is pretty much on par with Sublime; a nice text editor, but not that useful for developers.

timfjord commented 3 months ago

Without the ability to debug and run things, Zed is pretty much on par with Sublime; a nice text editor, but not that useful for developers.

Sublime has https://github.com/daveleroy/SublimeDebugger

xushuhui commented 3 months ago

I think this is unimportant to support many language little developer use,it will more popular product if zed focus on solve developer problem, because most developer only use main language like java、go、python etc. debug and snippet is first problem.

mokeyish commented 3 months ago

This is the only thing stopping me from using zed. If it is just an editor, it is usually used to view files, but Notepad is enough.

roadgork commented 3 months ago
kaynetik commented 3 months ago

Literally, each colleague I discussed Zed with said that this is the number one reason for not giving it a go as a day-to-day editor.

Teams that I collaborate with primarily revolve around the Go ecosystem, where delve is the De facto standard (god forbid, we had to depend on the gdb).


How far on the priorities list is this for the core Zed team?

xyaes commented 3 months ago

Literally, each colleague I discussed Zed with said that this is the number one reason for not giving it a go as a day-to-day editor.

Teams that I collaborate with primarily revolve around the Go ecosystem, where delve is the De facto standard (god forbid, we had to depend on the gdb).


How far on the priorities list is this for the core Zed team?

This is exactly the case in my lab. I'm a data scientist and my colleagues and students use Rust, C++ and Python. My team and I really enjoy Zed but can't delete VSCode until Zed has a debugger. Hopefully this is something that they are planning for in the near future!

JosephTLyons commented 3 months ago

Literally, each colleague I discussed Zed with said that this is the number one reason for not giving it a go as a day-to-day editor.

Teams that I collaborate with primarily revolve around the Go ecosystem, where delve is the De facto standard (god forbid, we had to depend on the gdb).

How far on the priorities list is this for the core Zed team?

Its important to us, but we have a lot of things that are huge like this to add. This item is listed on our 2024 roadmap and we know it is important - we will add it for sure! Also, we landed initial support for running tasks within Zed, which I think is one of the necessary building blocks for some of this stuff.

AllanPinheiroDeLima commented 2 months ago

Debug is extra important for me. Some projects are simply not feasible without a good debugger. I'll 1+ this one and wait. For the time being, is there any other debugger I could use with Zed in NodeJS projects ?

Thank you!

Varagos commented 2 months ago

A debugger is currently the only thing holding me from using Zed more actively too.

artemijan commented 2 months ago

debugger is a deal breaker for me

davidbuzz commented 2 months ago

PHP / xdebug / dbgp protocol needs to also be a part of this as its the most-popular language by-far for running websites, and it fully supports being debugged.

ximidas commented 1 month ago

I'm using Zed for Rust development, and interestingly, I find myself rarely needing a debugger for Rust. However, when I'm working with languages like Python, Ruby, JavaScript, and PHP, a debugger becomes indispensable.

zieen commented 1 month ago

I'm using Zed for Rust development, and interestingly, I find myself rarely needing a debugger for Rust. However, when I'm working with languages like Python, Ruby, JavaScript, and PHP, a debugger becomes indispensable.

why rust rarely needing a debugger for Rust?

davidbuzz commented 1 month ago

If Zed implemented Debug Adapter Protocol aka "DAP" to match what VSCode has ( as requested on this issue and https://github.com/zed-industries/zed/issues/5307 ) , then it should be possible to debug in Zed just about anything that can already be debugged in VSCode, including C,C++,php,c#,node, python, javascript, perl, haskel, ie all-the-things listed here: https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/

here's a rust implemention of DAP as well...: https://github.com/sztomi/dap-rs

arkxfly commented 1 month ago

why rust rarely needing a debugger for Rust?

@zieen From your GitHub profile, you also rarely coding.

jansol commented 1 month ago

why rust rarely needing a debugger for Rust?

Serious answer because this gets asked surprisingly often:

Rust's language-level guarantees and generally very insightful compiler error messages mean that it is rare to have to debug something at runtime. When you do, it is often something that is quickly solved by printing the offending statement with dbg!(<problematic statement here>). Also, panics in rust code give you a nice backtrace by default so you don't need a debugger for figuring out where that problematic statement is.

jnfDev commented 1 month ago

The only thing that is holding me back from switching Zed is the debugger, I love this editor but...

shenshouer commented 1 month ago

Any plan for debug support ? I like Zed very much, But I aways open vscode for debug and zed for write code !

Linyuqiz commented 1 month ago

Looking forward to the debugging function of go, so that I can switch to zed during work

davidbuzz commented 1 month ago

It seems to me there's three main parts to this..

  1. the GUI buttons for play/stop/next/pause/configure and the ability to "add breakpoint" to a line by clicking in the margin
  2. the GUI triggers to allow the editor view to be "jumped" to show a specific file and line
    1. the backend code to handle the triggers from/to the gui elements
Linyuqiz commented 1 month ago

Is this on the agenda? When will it be available online?

codingbugss commented 3 weeks ago

After installation, I prepared Test_, only to realize that I can't debug, um... , Time to back vscode