Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Somewhat related to #68 this adds debugger support.
By default, Electron sees our command line switches, so passing
--debug
or--debug-brk
is actually handled by Electron. This PR adds both switches to our options list to make sure that we don't halt because these options were passed (but we don't do anything with them).#68 was asking for VS Code support -- this could probably be made to work using the debugger protocol but we can't implement this kind of integration in electron-mocha.
Instead, this PR adds a way to debug renderer tests using the built-in debugger. When you run the tests with
--renderer-debug
we will show the test runner window and open the dev-tools; futhermore, in my testing I noticed that there is a slight delay until the debugger is ready, so we delay running the tests a little bit. That is to say, if you don't do anything else this option will run your tests as usually, but with a slight delay and the window will show up while the tests are running. But the cool thing is: if you add adebugger
statement anywhere in your tests or in your code the debugger will break once it reaches that statement.Additionally, this adds a
--renderer-debug-brk
which will break right in the renderer just before mocha will start.@jprichardson what do you think?