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

No tooltip on hover over a variable within closure and async function while debugging #31469

Closed
Deilan opened this issue Jul 26, 2017 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@Deilan
Copy link

Deilan commented Jul 26, 2017

  • VS Code Version: 1.14.2
  • OS Version: Windows 8.1 x64

Steps to Reproduce:

  1. git clone https://github.com/Deilan/vscode-issue-31469.git.
  2. yarn install or npm install.
  3. Set debug breakpoint in src/index.ts at lines 10 and 19
  4. Launch debug configuration Launch via nodemon.
  5. Wait till breakpoint at line 10 hits.
  6. Hover over syncBeforeDelayArg at line 5 and 6 - tooltip exists.
    Hover over syncDelayResult at line 7 - tooltip exists.
    Hover over syncAfterDelayArg at line 8 - tooltip exists.
    Hover over syncBeforeDelayArg at line 9 - tooltip does not exist.
    Hover over syncDelayResult at line 9 - tooltip exists.
    Hover over syncAfterDelayArg at line 9 - tooltip exists.
    No syncBeforeDelayArg at debug sidebar's local variables list.
  7. Continue and wait till breakpoint at line 19 hits.
  8. Hover over asyncBeforeDelayArg at line 15 and 16 - tooltip does not exist.
    Hover over asyncDelayResult at line 16 - tooltip does not exist.
    Hover over asyncAfterDelayArg at line 17 - tooltip does not exist.
    Hover over asyncBeforeDelayArg at line 19 - tooltip does not exist.
    Hover over asyncDelayResult at line 19 - tooltip does not exist.
    Hover over asyncAfterDelayArg at line 19 - tooltip does not exist.

Reproduces without extensions: Yes.

image

image

@vscodebot vscodebot bot added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jul 26, 2017
@Deilan Deilan changed the title No tooltip on hover over a variable within closure while debugging No tooltip on hover over a variable within closure and async function while debugging Jul 26, 2017
@weinand weinand assigned isidorn and unassigned isidorn Jul 26, 2017
@isidorn isidorn self-assigned this Jul 27, 2017
@isidorn isidorn added this to the July 2017 milestone Jul 27, 2017
@martypdx
Copy link

martypdx commented Jul 27, 2017

Experiencing this too. My project is purely synchronous library, during debug hover only works for "Local" scoped variables and sometimes first Closure level, everything else doesn't show tooltip. I'm pretty sure this started with last update.

@isidorn
Copy link
Contributor

isidorn commented Jul 27, 2017

Can you please try with vscode insiders since we did some work that improved this
https://code.visualstudio.com/insiders

@isidorn isidorn added the info-needed Issue requires more information from poster label Jul 27, 2017
@martypdx
Copy link

@isidorn tried vscode insiders, still just Locals working. In screenshot below, only quasi and i have hover.

image

@isidorn
Copy link
Contributor

isidorn commented Jul 28, 2017

@Deilan first of all thanks for the awesome repro steps, I wish all our issues are filed like this

In step 5 everything works fine for in latest vscode insiders. Note that syncBeforeDelayArg should not be in locals but in closure.
In step 7 I get the same issues you described. This comes from the fact that the protocol debug adapter returns wrong scope range information, namely for the local scope it says it starts on line 22 and is until line 28, becuase the hovered line is not in that range we do not even look at that scope (which contains all the valuable information).

Forwarding to @roblourens
If the scope range issue can not be fixed then we need to consider not using the falsy ranges information provided by the adapter.

@isidorn isidorn removed this from the July 2017 milestone Jul 28, 2017
@isidorn isidorn assigned roblourens and unassigned isidorn Jul 28, 2017
@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Jul 28, 2017
@weinand
Copy link
Contributor

weinand commented Jul 28, 2017

The scope ranges are source mapped from TS to JS, right?

@roblourens
Copy link
Member

roblourens commented Jul 28, 2017

Thanks for the repro case. The scope starts on an async function definition line. In this case that line is inserted by TS, so it doesn't have a sourcemapping, and we fail to sourcemap it. I can probably deal with this by trying again on lineNum+1 when it fails for a scope line.

@roblourens roblourens added this to the July 2017 milestone Jul 28, 2017
@isidorn isidorn added the verified Verification succeeded label Aug 2, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 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 debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants