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

Provide a diagnostic tool #260

Closed
roblourens opened this issue Jan 25, 2020 · 10 comments
Closed

Provide a diagnostic tool #260

roblourens opened this issue Jan 25, 2020 · 10 comments
Assignees
Labels
feature-request Request for new features or functionality on-testplan VS Code - Issue added to test plan
Milestone

Comments

@roblourens
Copy link
Member

The v1 adapter has the .scripts command which dumps info about which scripts are loaded, the sourcemap info, and how the paths are finally resolved after applying overrides. It would be useful to have the same in this adapter. Would be awesome to have this in GUI form, a custom treeview, or opening an editor with a nicely formatted markdown grid, or something more user friendly than what v1 does.

@connor4312 connor4312 added this to the Backlog milestone Jan 27, 2020
@connor4312 connor4312 added the feature-request Request for new features or functionality label Jan 27, 2020
@jasonwilliams
Copy link
Contributor

Yes please, this would make debugging these issues much easier

@connor4312
Copy link
Member

Could even pop open the browser and/or write an HTML file with details. We have a lot of data and being able to display it in a richer form than the debug console may make life easier. The analyzer could be built into it as well. That alone would make my debug loop a little faster.

@roblourens
Copy link
Member Author

Sort of related, I have imagined a workflow where you can click a source that looks like webpack://mycode.ts and pick the file on disk that it corresponds to, and we would generate the launch config parameters to produce that correct mapping.

@connor4312
Copy link
Member

Added a new command Create Diagnostic Information which generates a nice .html report. Example: https://memes.peet.io/img/js-debug-diagnostics2.html

  • shows current sources and shows you sourcemap children/parents
  • has a 'breakpoint fixer' that checks for a few common cases
    • a breakpoint set in a file that was missing. Will show if there are any files of the same name in the runtime.
      • For .ts/x files it suggests adding sourceMap: true to the tsconfig.json if no files are found
      • For web launches it suggests changing the webRoot
      • If it sees the user specific outFiles, it suggests removing the glob (since we default to the workspace)
    • Breakpoints where they match a file, but are unbound by the runtime (almost always outdated sources or bad locations)

@connor4312 connor4312 modified the milestones: Backlog, October 2020 Oct 9, 2020
@connor4312 connor4312 self-assigned this Oct 9, 2020
@connor4312 connor4312 added the verification-needed Verification of issue is requested label Oct 9, 2020
@bartocc
Copy link

bartocc commented Oct 15, 2020

I get the following error when running this new Create Diagnostic Information for Current Session command:

Command 'Debug: Create Diagnostic Information for Current Session' resulted in an error (Error processing createDiagnostics: Error: ENOENT: no such file or directory, open '/Users/julien/.vscode/extensions/ms-vscode.js-debug-nightly-2020.10.1317/src/index.bundle.js')

Is this a bug or am I missing something?

@connor4312
Copy link
Member

Thanks for pointing that out; fixed in the next nightly

@bartocc
Copy link

bartocc commented Oct 26, 2020

I can confirm it works in v2020.10.2217 👍

@connor4312 connor4312 added on-testplan VS Code - Issue added to test plan and removed verification-needed Verification of issue is requested labels Oct 26, 2020
@sippeangelo
Copy link

Where is this now? I've been following a trail of issues from the original .scripts command to this issue, but I can't find any Create Diagnostic Information command any more. Was it removed? What's the replacement?

@sippeangelo
Copy link

sippeangelo commented Jun 17, 2021

The command seems to have been renamed to Diagnose Breakpoint Problems and it's only available while a debug session is active!

@connor4312
Copy link
Member

In the next release I added a simple rewrite so .scripts will also open the new tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality on-testplan VS Code - Issue added to test plan
Projects
None yet
Development

No branches or pull requests

5 participants