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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

WAT the WTF do programmers use as debug strings?

7 点作者 hodgesmr超过 11 年前

6 条评论

forgottenpass超过 11 年前
<p><pre><code> &quot;\x1B[1;36;40m&quot; &quot;\n&quot; &quot;\x1B[0;37;40m&quot; </code></pre> I keep a file sitting around with versions for different colors&#x2F;languages.
评论 #6685489 未加载
评论 #6685583 未加载
bandy超过 11 年前
Really? I give location and context and the Why of the message. I make sure that every message is unique (unlike the code I changed in a certain once-prominent US firm&#x27;s three-letter operating system) as well. I clearly know nothing and shouldn&#x27;t be in the profession.
评论 #6684241 未加载
RossM超过 11 年前
In PHP I tend to do something like:<p><pre><code> dd(__DIR__.&#x27;&#x2F;&#x27;.__FILE__.&#x27;:&#x27;.__LINE__); </code></pre> Which prints out the current script and line, and then stops execution (where dd is var_dump+exit).
jweather超过 11 年前
&quot;this should never happen&quot; and&#x2F;or &quot;how did you get here?&quot;
claudiowilson超过 11 年前
I use the ever eloquent, &quot;yolo&quot;.
NoodleIncident超过 11 年前
herp, derp, flurp, and slurp are immensely useful words for one-off variables in an interactive interpreter.