breakpoints, etc don't work v1.0.49, .50
Steps to reproduce
Tell us about your environment:
- ndb version: v1.0.49, v1.0.50
- Platform / OS version: macos 10.14.5
- Node.js version: v10.16.0
What steps will reproduce the problem?
ndb firebase serve
Please include code that reproduces the issue.
throw 'ANY THING YOU WANT'- add a
debuggerstatement anywhere
What is the expected result?
when 'pause on exceptions' is enabled (the stop sign button) or debugger statements are reached, pause and show the stack, exception, etc as-it-does-in v1.0.48
What happens instead?
The same thing that happens when not using a debugger--for handled or unhandled exceptions, etc.... seems broken to me. In case it's unclear: nothing happens and the above should happen.
solution
- downgrade with
npm i -g [email protected] - resume work
To run this command, do I need to install globally firebase package? I found that I actually need firebase-tools.
This bug is introduced by https://github.com/GoogleChromeLabs/ndb/commit/f6ad01de14a9ecec2bdd3c6cd4f6e295c303798f
[email protected] contains a fix, please check it out and thanks for your report.
@ak239 unfortunately this does not appear to be resolved. My application and environment is unchanged and when running the same commands using the newly released v1.0.51, with the original reported issue above, the application no longer runs. I've tried multiple times to the same effect (and have not restarted my machine). However, as before, downgrading to v1.0.48 resolves the problem. (If these changes in .49 through .51 introduce much longer startup times, or if there's the need for restarts after updating, I can take another look. Otherwise this does not appear to resolve the issue.)
Could you share how can I setup the project to reproduce your bug? It sounds like I should create some kind of hello world app with firebase and run firebase serve from the root.
Where should I add debugger statement?
@jimmont could you help with detailed reproduction steps?
I have a firebase project which I run using firebase serve in the project directory where the .firebaserc and firebase.json files are setup and default subfolder for the functions. When I run it using ndb firebase serve after version 1.0.48 in all versions I've tried over the past months ndb no longer breaks on uncaught errors or on breakpoints. I would expect that setting up any generic firebase project, then running it in the way described here should show the problem. In my case the newest v1.1.4 fails to show the running node processes, fails to stop on uncaught exceptions, fails to pause on breakpoints. From my perspective as a user ndb after 1.0.48 no longer works. Has anyone in your group setup a generic firebase project and tried to, for example, setup a post handler where the code tries setting a property on an undefined property, or throws an error, or set breakpoints? I would imagine this would make an excellent first step in reproducing what I am describing as recurring every time I update ndb since v1.0.48.
To reproduce please try this (the above as bullets):
- create a firebase project
- create a POST handler
- in the handler throw an error or do something like set a property on an undefined object which throws
- run the project with ndb
ndb firebase serve
As an aside, this is so highly reproducible I'm not sure what else to share except doing the work myself, which I thought I was already doing in my work and reporting the issue here already.