Chrome Dev Tools在Linux上:无法打开堆栈跟踪链接

huangapple go评论49阅读模式
英文:

Chrome Dev Tools on Linux: Can't Open Stacktrace Links

问题

我使用Linux(Mint)并使用Chrome开发者工具。每当我在堆栈跟踪中点击文件链接(来自错误、警告等),例如如果我点击layout.js...

在FrontPage(webpack-internal:///./src/components/layout.js:46:11)

...然后Chrome试图打开链接到:

webpack-internal:///./src/components/layout.js

以前,这只会在Dev Tools的“Sources”选项卡中显示文件...但现在它却打开了一个来自xdg-open的提示,显示“一个网站想要打开此应用程序”。

如果我打开它,我会卡在webpack-internal:///./src/components/layout.js的空选项卡上。如果我取消,什么都不会发生。

有人知道如何让它再次在Dev Tools的Sources选项卡中打开这些链接吗?

英文:

I'm on Linux (Mint) and using the Chrome Developer Tools. Whenever I click on a file link in a stack trace (from an error, warning, etc.) ... for instance if I click on layout.js in ...

at FrontPage (webpack-internal:///./src/components/layout.js:46:11)

... Chrome then tries to open the link to:

webpack-internal:///./src/components/layout.js

Previously that would just show me the file in the Dev Tools' "Sources" tab ... but now it instead opens a prompt from xdg-open, saying "A website wants to open this application."

If I open it, I'm stuck on an empty tab for webpack-internal:///./src/components/layout.js. If I cancel, nothing happens.

Does anyone know how I can get it to go back to opening such links within the Dev Tools Sources tab?

答案1

得分: 0

我不知道你的确切解决方案,但当我遇到类似情况时,我可以建议你一个。
你可以尝试将你的源代码文件夹添加到Chrome的开发工具工作区选项卡中,该选项卡位于源代码选项卡下。
你可以参考Chrome工作区指南
我也附上了一张来自我的桌面的截图,以帮助你解决问题。
希望对你有所帮助。
谢谢 Chrome Dev Tools在Linux上:无法打开堆栈跟踪链接

Chrome Dev Tools在Linux上:无法打开堆栈跟踪链接

英文:

I don't know your exact solution, but I can suggest you one when I come across similar situation.<br>
You can try adding your source code folder to chrome's dev tools workspace tab which is under sources tab.<br>
You can refer to Chrome Workspace Guide.
I am also attaching a screenshot from my desktop to help you figure out.
Hope it will help.
Thanks Chrome Dev Tools在Linux上:无法打开堆栈跟踪链接

Chrome Dev Tools在Linux上:无法打开堆栈跟踪链接

答案2

得分: 0

作为Chrome开发者在这里解释过,

>这里的问题在于Error.stack的内容的一部分包含来自Node.js服务器的堆栈跟踪,而您正在调试React客户端(在浏览器中)。

>我们的建议是提出一个关于next.js的错误报告 - 他们不应该提供指向DevTools的错误链接。

英文:

As a Chrome developer explained here

>The problem here is that part of the Error.stack content contains a stack trace from the Node.js server, while you are debugging the React client (in the browser).

>Our recommendation is to open a bug against next.js - they should not provide broken links to DevTools.

huangapple
  • 本文由 发表于 2023年5月28日 08:31:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/76349541.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定