Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nest start always start in debug mode #642

Closed
katsanva opened this issue Mar 27, 2020 · 2 comments
Closed

nest start always start in debug mode #642

katsanva opened this issue Mar 27, 2020 · 2 comments

Comments

@katsanva
Copy link

katsanva commented Mar 27, 2020

I'm submitting a...


[ ] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

nest start always start in debug mode due to unsafe checks
Options contain even not initialized values:

[
  { name: 'config', value: undefined },
  { name: 'webpack', value: undefined },
  { name: 'debug', value: undefined },
  { name: 'watch', value: false },
  { name: 'watchAssets', value: false },
  { name: 'path', value: undefined },
  { name: 'webpackPath', value: undefined },
  { name: 'exec', value: undefined },
  { name: 'preserveWatchOutput', value: false }
]

So next check is false-positive

if (debug) {

also, this one is suspicious
!!debugModeOption,

Expected behavior

--debug or --debug-brk options control that

Minimal reproduction of the problem with instructions

Seems to be broken in #592

Simply make npm i in https://github.com/nestjs/nest/tree/master/sample/12-graphql-schema-first or any other sample

➜  12-graphql-schema-first git:(master) ✗ ./node_modules/.bin/nest start
Debugger listening on ws://127.0.0.1:9229/c822fd22-351f-425b-b25a-cf354383e901
For help, see: https://nodejs.org/en/docs/inspector

What is the motivation / use case for changing the behavior?

Environment


@kamilmysliwiec
Copy link
Member

Fixed in 7.1.1 Sorry about that!

@atjeff
Copy link
Contributor

atjeff commented Mar 29, 2020

@kamilmysliwiec, I'm looking into this and trying to fix my bug, but I am a bit confused. Even if I do nest start --debug, options still looks like this:

  { name: 'config', value: undefined },
  { name: 'webpack', value: undefined },
  { name: 'debug', value: undefined },
  { name: 'watch', value: false },
  { name: 'watchAssets', value: false },
  { name: 'path', value: undefined },
  { name: 'webpackPath', value: undefined },
  { name: 'exec', value: undefined },
  { name: 'preserveWatchOutput', value: false }
]

How does it work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants