Debugging in 1.6 (--inspect or --inspect-brk)?


Can anyone please explain what parameters should be used for debugging in 1.6 to match what we had in earlier versions?

I use Webstorm and have been back and forth with their support as they use the --inspect-brk parameter for debugging. This causes meteor to generate a file called debug.js each time code is saved (containing a debugger statement) therefore pausing the code. This is very irritating as it means we have to press a button to continue on every save.

I thought the solution was to get Webstorm to pass in --inspect instead but their response was:

In previous versions, WebStorm used --debug-brk to debug Meteor projects; now, it uses --debug-brk for Meteor < 1.6 and --inspect-brk for Meteor >= 1.6; so no principle changes have been introduced on IDE side, and nothing that can be considered a regression: both options cause the debugger to pause on first line. WebStorm normally auto-resumes the execution once the debugger is attached, so you won’t notice that the breakpoint is hit.

What has changed is Meteor behavior: starting from 1.6, it auto-generates debug.js files with debugger; statement when being started with either meteor --inspect-brk or meteor debug. And Node.js always stops at debugger; - this is Node core behavior.
When running meteor --inspect this statement is not generated, so execution is not suspended until debugger is connected.


The problem is caused by Meteor new behavior, not an issue in WebStorm running with meteor --inspect won’t match previous behavior, as ‘early’ breakpoints will be skipped - only breakpoints in code executed on events will be hit.

So it sounds like the choice is using --inspect and it not hitting early breakpoints or --inspect-brk where it breaks at the start of execution (but on every save).

Neither sounds right. What is everyone else using?


@matt90410 Have you found any fix or workaround for this?
I’ve just upgraded to 1.6 and this issue is driving me crazy


Webstorm have just released an EAP version of version 2017.3.3. This version allows --inspect to be used instead of --inspect-brk.

See this url for details:

I have been using Webstorm with --inspect enabled for the last couple of days and it appears to be working well.


@matt90410 Thank you so much for taking the case with JetBrains and getting them to fix! Works well with 2017.3.3