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

debug requirements for TypeScript #88857

Closed
weinand opened this issue Jan 17, 2020 · 7 comments
Closed

debug requirements for TypeScript #88857

weinand opened this issue Jan 17, 2020 · 7 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality

Comments

@weinand
Copy link
Contributor

weinand commented Jan 17, 2020

from #84044:

  • finding an "evaluatable" expression for a given source location.
    E.g. for any character position in the string "doc.foo[a+b].x > foo" return the "evaluatable" expression that should be shown in the hover.
  • exact source maps for mapping source code ranges for frames and scopes. The JS debugger receives JS source ranges and they have to map correctly to TS ranges (and vice versa).
  • bidirectional variable mapping.
    The JS debugger only sees JS variable names and the debug extension needs to have a way of mapping JS names to TS names (and vice versa). Source maps provide a mechanism for that but the maps were not complete and aren't used in our debuggers I think.
@weinand weinand added feature-request Request for new features or functionality debug Debug viewlet, configurations, breakpoints, adapter issues labels Jan 17, 2020
@weinand weinand changed the title TypeScript requirements debugger requirements for TypeScript Jan 17, 2020
@weinand weinand changed the title debugger requirements for TypeScript debug requirements for TypeScript Jan 17, 2020
@vscodebot vscodebot bot added this to the Backlog Candidates milestone Jan 17, 2020
@weinand weinand modified the milestones: Backlog Candidates, On Deck Jan 17, 2020
@microsoft microsoft deleted a comment from vscodebot bot Jan 17, 2020
@mjbvz
Copy link
Collaborator

mjbvz commented Jan 17, 2020

Lower priority:

  • Evaluate TS code in debug console (I hit this a lot for enums and imports)

@mjbvz
Copy link
Collaborator

mjbvz commented Jan 22, 2020

@weinand
Copy link
Contributor Author

weinand commented Jan 23, 2020

@mjbvz Thanks a lot! I'm very interested in that information, but the link does not work for me.

@mjbvz
Copy link
Collaborator

mjbvz commented Jan 23, 2020

You need to be on corpnet for this. The specific call to the TS Server is:

   var result = await this.taskHandler.InvokeTSServerAsync(CommandNames.NameOrDottedNameSpan, document, TaskPriority.High, cancellationToken,
                         (proxy, endpoint, operationToken) => proxy.GetNameOrDottedNameSpan(endpoint, document, endPoint.Value.Position, operationToken));

We don't use this command currently

@connor4312
Copy link
Member

Request for an InlineValueProvider: #119489 (comment)

@connor4312
Copy link
Member

@hediet brought up the state of const enums. This can partially be solved by sourcemap renames (which we will support some day, #12066) but not very well. There's also been the request to transpile typescript in the REPL, which @eamodio asked for. Both of these would be solved if I could ask the TS server to transpile this bit of code as if it was written at a certain position/scope in a file, though that may be easier said than done.

@weinand weinand removed their assignment Oct 19, 2022
@connor4312
Copy link
Member

bidirectional variable mapping.

THis is now done with the sourcemap "names", which are now pretty good following microsoft/vscode-js-debug#1827

exact source maps for mapping source code ranges for frames and scopes

Work is happening in that in https://github.com/tc39/source-map-rfc

finding an "evaluatable" expression for a given source location

Covered by #18058, merging

@connor4312 connor4312 added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 4, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants