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?