Skip to content

Commit 2f9cf80

Browse files
committed
fix: more debug messages, close #7
1 parent b6a15f0 commit 2f9cf80

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ The Xvfb constructor takes four options:
2828

2929
### Debugging
3030

31-
Run with `DEBUG=xvfb` environment variable to see debug messages
31+
Run with `DEBUG=xvfb` environment variable to see debug messages. If you want
32+
to see log messages from the Xvfb process itself, use `DEBUG=xvfb,xvfb-process`.
3233

3334
### Thanks to
3435

index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Xvfb.prototype = {
4747

4848
let totalTime = 0
4949
;(function checkIfStarted () {
50-
debug('checking if started by looking at the lock file', lockFile)
50+
debug('checking if started by looking for the lock file', lockFile)
5151
fs.exists(lockFile, function (exists) {
5252
if (didSpawnFail) {
5353
// When spawn fails, the callback will immediately be called.
@@ -159,7 +159,10 @@ Xvfb.prototype = {
159159
} else {
160160
const stderr = []
161161

162-
self._process = spawn('Xvfb', [display].concat(self._xvfb_args))
162+
const allArguments = [display].concat(self._xvfb_args)
163+
debug('all Xvfb arguments', allArguments)
164+
165+
self._process = spawn('Xvfb', allArguments)
163166
self._process.stderr.on('data', function (data) {
164167
stderr.push(data.toString())
165168

0 commit comments

Comments
 (0)