Skip to content

Tooltips not showing up when using Jest #35612

Closed

Description

@matbarker
  • VSCode Version: Code 1.16.1 (27492b6, 2017-09-14T16:38:09.760Z)
  • OS Version: Windows_NT ia32 10.0.15063
  • Extensions:
Extension Author (truncated) Version
vscode-eslint dba 1.3.2
csharp ms- 1.12.1
debugger-for-chrome msj 3.3.1
vetur oct 0.9.10

Steps to Reproduce:

  1. Clone repository: https://github.com/matbarker/vscode-jest
  2. Run the "Jest Tests" configuration, place a breakpoint on line 8 (console.log) of the test file, hover over 'boo' - nothing pops up. I expect to see the normal tooltip which inspects the contents of the variable. This works if I use the "mocha" framework instead of Jest.

Reproduces without extensions: Yes

Activity

  1. added
    debug
    on Oct 5, 2017
  2. isidorn commented on Oct 5, 2017

    @isidorn

    Mat (@matbarker) thank you for the nice reproducable steps. I can repro this and the issue is that the node2 debug adapter returns wrong scope ranges. In this example there 3 scopes Global, Local and Closure. And the Local one has the wrong ranges thus we do not search in it for the 'boo' variable.
    Forwaring to roblourens since this wrong scope ranges are coming from his adapter

  3. added this to the October 2017 milestone on Oct 5, 2017
  4. roblourens commented on Oct 29, 2017

    @roblourens
    Member

    I can repro too. There are some weird mappings in the sourcemap, but I have no idea why. The adapter ends up mapping the end line of the scope to be the same as the start line, but that's just based on info from the sourcemap.

    What's also strange is that when I comment out the indicated line, it works, but it shouldn't, because it's still returning the bad scope. Maybe you can check that out Isidor Nikolic (@isidorn) or give me a code pointer to investigate.

    This is the result that's returned when the last line is commented out. Hovering 'boo' shouldn't work, but it does.

    To client: {"seq":0,"type":"response","request_seq":11,"command":"scopes","success":true,"body":{"scopes":[{"name":"Local","variablesReference":1000,"expensive":false,"column":22,"line":5,"endColumn":5,"endLine":5},{"name":"Global","variablesReference":1001,"expensive":true}]}}
    

    For the root of the problem, it looks like it's compiling with babel (but not making any real changes). Might be a babel bug or a weird config, not sure how to investigate it.

  5. isidorn commented on Oct 30, 2017

    @isidorn

    roblourens here's a code pointer for getting the most specific scope. Just place a breakpoint there when you hover and you should be able to nicely inspect everything https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/debug/common/debugModel.ts#L360

  6. joaomoreno commented on Nov 1, 2017

    @joaomoreno
    Contributor

    I just hit a missing hover too, while debugging an extension.

    Hovering over changes doesn't do anything, while hovering over notTracked works fine:

    image

    image

  7. roblourens commented on Nov 1, 2017

    @roblourens
    Member

    What project is that Joao?

  8. roblourens commented on Nov 1, 2017

    @roblourens
    Member

    I can't repro, would be helpful if you add "trace": true to the launch config and send the log

  9. roblourens commented on Nov 26, 2017

    @roblourens
    Member

    Should be fixed by #37838

  10. added
    *duplicate
    on Nov 26, 2017
  11. locked and limited conversation to collaborators on Jan 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

*duplicatedebug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions