Skip to content

Cannot step over a fiber yield when debugging server with Meteor 1.6 #9275

@mattmccutchen

Description

@mattmccutchen

When I'm debugging the server of a Meteor 1.6 application using the Node.js built-in debugger, when I try to step over a function call that yields the current fiber, the server goes on running and does not stop on the next line of code. Using Meteor 1.5.2.2 and node-inspector, the server properly stops on the next line. Maybe it's possible to use node-inspector with Meteor 1.6, but this doesn't look promising. So this looks like a significant loss of debugging functionality for server code that (for example) writes to Mongo collections. This may be enough grounds for me to hold off on upgrading to Meteor 1.6.

I imagine the underlying incompatibility between fibers and the Node.js built-in debugger is nothing Meteor-specific, so I was surprised not to find any discussion of the problem in a few web searches.

As requested by the bug template, I'm using the 64-bit Linux version of Meteor; I doubt it matters.

Reproduction:

  1. Run:
git clone https://github.com/mattmccutchen/meteor-debug-yield-repro
cd meteor-debug-yield-repro
meteor npm install    # https://github.com/meteor/meteor/pull/8165 ...
meteor debug
  1. Open http://localhost:8080/?port=5858 in Google Chrome. You should be on the second debugger statement (there seems to be a problem with stopping early in server startup).
  2. Press F10 repeatedly. The debugger should eventually step to console.log("after"); and stop there.
  3. Exit the server with Ctrl-C.
  4. Run: meteor --release=1.6 --inspect
  5. Open the Google Chrome-based debugger (about:inspect, "Open dedicated DevTools for Node"). You should be on the first debugger statement.
  6. Press "Resume". You should now be on the second debugger statement.
  7. Press F10 repeatedly. When you are on f.wait(); and press F10, the console.log("after"); executes without the debugger first stopping on that line.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions