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

Promise variables show as undefined although they are not #2107

Closed
jrieken opened this issue Jan 19, 2016 · 3 comments
Closed

Promise variables show as undefined although they are not #2107

jrieken opened this issue Jan 19, 2016 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verified Verification succeeded
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented Jan 19, 2016

See attached screen shot. The promise argument shows as undefined everywhere but the console reveals the truth when you 'use' it.

screen shot 2016-01-19 at 15 00 06

@jrieken jrieken added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority labels Jan 19, 2016
@jrieken
Copy link
Member Author

jrieken commented Jan 19, 2016

to reproduce:

  • set a breakpoint in the unhandledRejection handler
  • execute the snippet(*) below in an extension (as command for instance)

when it breaks promise is shown as undefined

*snippet

      const rejectedPromise = new Promise((resolve, reject) => {
            reject('foo');
        });

        setTimeout(() => {
            rejectedPromise.catch(() => {
                console.log('handing error now');
            });
        }, 2000);

@weinand weinand added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Jan 19, 2016
@weinand
Copy link
Contributor

weinand commented Jan 19, 2016

@jrieken this is a limitation of the node v8 debugging protocol. node-inspector shows the same behavior:
2016-01-19 15-29-08

@rebornix
Copy link
Member

Ran into the same situation. Whenever I create a new promise, the intellisense keeps saying it's undefined.

@weinand weinand changed the title variables show as undefined although they are not Promise variables show as undefined although they are not Feb 26, 2016
@weinand weinand removed the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Mar 13, 2016
@weinand weinand added this to the March 2016 milestone Mar 13, 2016
@weinand weinand assigned jrieken and unassigned weinand Mar 21, 2016
@jrieken jrieken added the verified Verification succeeded label Mar 21, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants