TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What are youre favorite languages to debug in?

5 点作者 Decabytes超过 2 年前
I’m looking to learn a new programming language. One of the most important thing for me is its debugability. What languages would you recommend?

4 条评论

mindcrime超过 2 年前
For my money? Java, hands down.<p>I haven&#x27;t worked in any environment that made it easier to do symbolic debugging, including attaching a symbolic debugger remotely (over the network) to a running process on another machine. Note that the process in question does need to have been started with certain specific command line arguments in order to do this, and most of the time you don&#x27;t run your apps with the JDWP[1] stuff turned on, for security and performance reasons. But if you have a web app or something that&#x27;s misbehaving, it&#x27;s incredibly handy to be able to turn that on, fire up Eclipse (or whatever), connect the debugger, and use all your standard step over, step into, etc. debugging facilities[2].<p>[1]: <a href="https:&#x2F;&#x2F;docs.oracle.com&#x2F;javase&#x2F;8&#x2F;docs&#x2F;technotes&#x2F;guides&#x2F;troubleshoot&#x2F;introclientissues005.html" rel="nofollow">https:&#x2F;&#x2F;docs.oracle.com&#x2F;javase&#x2F;8&#x2F;docs&#x2F;technotes&#x2F;guides&#x2F;troub...</a><p>[2]: <a href="https:&#x2F;&#x2F;dzone.com&#x2F;articles&#x2F;remote-debugging-java-applications-with-jdwp" rel="nofollow">https:&#x2F;&#x2F;dzone.com&#x2F;articles&#x2F;remote-debugging-java-application...</a>
loveparade超过 2 年前
I&#x27;ll probably get a ton of pushback on this, but I never found huge value in debugging compared to using a strict type system and writing easily testable code. I haven&#x27;t debugged, as in used an interactive debugger like gdb, in many many years, not counting occasions where I needed to reverse-engineer some C code.<p>I would prefer languages where the need for interactive debugging is minimized through the type system, good abstractions, and good testing frameworks. Functional languages (ideally strongly typed), or something like Rust, tend to fall into this category. And even for less strict languages, I find debugging to be significantly slower than spending upfront time writing testable abstractions, which usually means functional code that operates on immutable data structures when possible.<p>Debuggability is nice... but isn&#x27;t not having to debug even better?
评论 #34285105 未加载
MH15超过 2 年前
Not PHP. I did an internship at a PHP shop where the engineers used Jetbrains, so I assumed debugging was on the table. I spent a week on and off figuring out how to set up a good debugger and realized I was the only person in the ~20 engineer company with a functional debugger. I&#x27;d say it paid off but just barely. While modern PHP is far improved from what we often ding here on HN, it&#x27;s still got its warts.
josephcsible超过 2 年前
Haskell. Since functions are pure, you can jump straight to the function that gives the wrong output for some input, skipping the part where you have to get the program into a certain state for the bug to be able to manifest.