Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support debug in dev process #1051

Merged
merged 1 commit into from
Nov 29, 2018
Merged

feat: support debug in dev process #1051

merged 1 commit into from
Nov 29, 2018

Conversation

ulivz
Copy link
Member

@ulivz ulivz commented Nov 27, 2018

'* + Enter' to log the keys of AppContext, while 'key + Enter' is to log the value of corresponding
field in AppContext

Summary

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

'* + Enter' to log the keys of AppContext, while 'key + Enter' is to log the value of corresponding
field in AppContext
@ulivz ulivz merged commit e570252 into master Nov 29, 2018
@spiltcoffee
Copy link
Contributor

spiltcoffee commented Nov 30, 2018

I think this PR is causing vuepress dev to crash for me now.

When running it, I get this error:

events.js:167
      throw er; // Unhandled 'error' event
      ^

Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
    at doWrite (_stream_writable.js:406:19)
    at writeOrBuffer (_stream_writable.js:394:5)
    at WriteStream.Writable.write (_stream_writable.js:294:11)
    at clearScreen (node_modules\@vuepress\core\lib\webpack\DevLogPlugin.js:46:18)
    at SyncHook.eval [as call] (eval at create (node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:7:1)
    at SyncHook.lazyCompileHook (node_modules\tapable\lib\Hook.js:154:20)
    at Watchpack.watcher.compiler.watchFileSystem.watch (node_modules\webpack\lib\Watching.js:139:33)
    at Object.onceWrapper (events.js:273:13)
    at Watchpack.emit (events.js:182:13)
    at Watchpack._onChange (node_modules\watchpack\lib\watchpack.js:118:7)
    at Watchpack.<anonymous> (node_modules\watchpack\lib\watchpack.js:99:8)
    at Watcher.emit (events.js:182:13)
    at node_modules\watchpack\lib\DirectoryWatcher.js:101:9
    at Array.forEach (<anonymous>)
    at DirectoryWatcher.setFileTime (node_modules\watchpack\lib\DirectoryWatcher.js:99:42)
    at DirectoryWatcher.<anonymous> (node_modules\watchpack\lib\DirectoryWatcher.js:312:12)
Emitted 'error' event at:
    at onwriteError (_stream_writable.js:425:12)
    at onwrite (_stream_writable.js:456:5)
    at doWrite (_stream_writable.js:406:11)
    at writeOrBuffer (_stream_writable.js:394:5)
    [... lines matching original stack trace ...]
    at Array.forEach (<anonymous>)

If I comment out the changes made by this PR, then everything works again.

@ulivz
Copy link
Member Author

ulivz commented Nov 30, 2018

@spiltcoffee You should provide your context instead of pasting your error here.

@ulivz ulivz deleted the debug-in-cli branch November 30, 2018 06:21
@spiltcoffee
Copy link
Contributor

I'll create an example project for ya, see if it's happening outside of my use case.

@spiltcoffee
Copy link
Contributor

@ulivz here you go: https://github.com/spiltcoffee/vuepress-dev-crash

I don't get any additional information or context supplied when the crash occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants