最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - is it possible to run chrome in debug mode? - Stack Overflow

programmeradmin5浏览0评论

Firstly I'm really not sure if this is a question for Super-User or Stack-Overflow. It may certainly useful for other developers but it's not a specific code question.

In Google Chrome is there a way to look at render engine exceptions or general debugging info? I have some code which i'm 99% certain is crashing the render/repaint engine for chrome but (i'm on a mac) in the Console.app I don't get notifications for the exception. I'm wondering if theres a way of forcing chrome to be much more verbose in it's logging? Perhaps it's a webkit thing rather than chrome specific.

Let me know if this really isn't for stack overflow and I'll remove/close the question like I said I'm aware it's not code specific.

Firstly I'm really not sure if this is a question for Super-User or Stack-Overflow. It may certainly useful for other developers but it's not a specific code question.

In Google Chrome is there a way to look at render engine exceptions or general debugging info? I have some code which i'm 99% certain is crashing the render/repaint engine for chrome but (i'm on a mac) in the Console.app I don't get notifications for the exception. I'm wondering if theres a way of forcing chrome to be much more verbose in it's logging? Perhaps it's a webkit thing rather than chrome specific.

Let me know if this really isn't for stack overflow and I'll remove/close the question like I said I'm aware it's not code specific.

Share Improve this question edited May 4, 2012 at 13:53 Alex asked Apr 24, 2012 at 2:41 AlexAlex 3,7905 gold badges40 silver badges60 bronze badges 1
  • 1 Have you read this: chromium/developers/how-tos/…? – j08691 Commented May 4, 2012 at 15:26
Add a ment  | 

3 Answers 3

Reset to default 6

Yes!

You can start chrome from the mand line on a mac. See a previous question here

something like this:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

You can also pass a flag to make chrome output to a log file by appending:

--enable-logging --v=1

This should write a log file chrome_debug.log which lives somewhere in your ~/.config/ directory.

Then you can tail that log. My mand for that is:

$ tail -F ~/.config/chromium/chrome_debug.log

Your path to the log file may be different.

Hope that helps!

In a similar way as Rimian's answer, in Windows you can also start Chrome from mand line enabling logging. Just open CMD and type:

cd C:\Program Files\Google\Chrome\Application
chrome --enable-logging --v=1

The log file chrome_debug.log is in C:\Users\<USERNAME>\AppData\Local\Google\Chrome\User Data. Notice you have to replace for your username.

I am not pletely sure whether I understood it correctly but maybe you want to check out chromium HOW-TO for mac rather than windows. you have two possibilities to debug the renderer process

a) Run Chrome in a single process or b) Attach XCode's debugger to a renderer process after launch

They are described in detail here. Hope that helps

EDIT: updated the link

发布评论

评论列表(0)

  1. 暂无评论