hexojs / hexo-server

Server module for Hexo.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

--debug flag is not working with node-inspector

TylerYang opened this issue · comments

commented

Hi guys, just try to create a new hexo-server 3rd party component, when I try to debug the hexo-server with node-inspector, seems it is not working. Is there any other way to debug the hexo-server ?

commented

Just found a way to do it,

node-inspector
cd node_modules/hexo/node_modules/hexo-cli/bin
node --debug hexo serve

Hexo => Hexo-Cli(This module then create a Hexo instance and then runHexoCommand)
So Hexo-Cli is the entry point of the whole project.

But I think it will be better if we can simple run hexo serve --debug to enable the debug mode for node-inspector. For now hexo --debug seems just simply print the error message to terminal.

At least I think it is not so friendly to developers.

hexo serve --debug is a verbose mode to print more log.
It have nothing to do with external module like node-inspector.
Hope you understand.

commented

I understand the hexo serve --debug is a specific mode for the developer to debug.

Just a small proposal, if we can let the developer to add the breakpoints(with statement debugger) to debug their hexo serve plugin, then this would help them a lot.