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

Make extensionHostProcess.js more accessible #216510

Closed
phil294 opened this issue Jun 18, 2024 · 2 comments
Closed

Make extensionHostProcess.js more accessible #216510

phil294 opened this issue Jun 18, 2024 · 2 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues info-needed Issue requires more information from poster under-discussion Issue is under discussion for relevance, priority, approach

Comments

@phil294
Copy link

phil294 commented Jun 18, 2024

Does this issue occur when all extensions are disabled?: well it's about developing extensions

  • VS Code Version: latest insiders
  • OS Version: Manjaro

Every time I'm debugging extension code I'm battling against extensionHostProcess.js. There was an issue once 5 years ago #74845 where the suggestion was to exclude it from the debugger. But I don't want to do that - often this very file includes some hints to what went wrong.

Here's just one example: Today, I was presented with this (no stack trace):
image
("Canceled" thousands of times, in extensionHostProcess:147). I have no idea where it comes from nor what it does. "Canceled" doesn't occur in my workspace. It keeps logging this hundreds of times per second, and eventually the entire editor freezes up. Might be my fault or some log output loop, idk, doesn't matter, this would be okay so far, it it were possible to debug.

I could click on the file and after 30 seconds of unresponsiveness, I am eventually facing this:

image

So I put a breakpoint into line 147, but the "Canceled" message just kept logging as before, so I guess it pointed to the wrong line.

After restarting the extension, the file became invalid, as now a new extensionHostProcess.js tab opens up. Apparently every runner gets its own.

After restarting, the file is gone.


I can't tell you just how many times stuff like this happens. Development is always a debugging process, and debugging is a constant frustrating pain. I find myself battling against the horrible usability of extensionHostProcess.js just way too many times, and it really doesn't have to be like this.

Please,

  • at least configure your minifier to keep line breaks, or better,
  • disable aggressive minification for this file
  • split this file into multiple chunks so it doesn't take ages to load
  • add columns to the loggings, e.g. it should be extensionHostProcess.js:147:40205, not just :147
  • if possible, reuse it between extensions
  • if possible, keep it open after restart
@connor4312
Copy link
Member

  • We have no plans to disable minification for the extension host file, as there are strong benefits to keeping it there. Note that if have extensionHostProcess.js in your call stack you can hit the curly braces {} in the top right editor actions to deminify the code.
  • We don't do in-process code splitting at all for VS Code yet, but might in the future. That's tracked here: Explore lazy code loading #164068
  • Currently the logging only shows the line in the REPL for cleanliness, but clicking on the log location will bring you to the right column in the file. Are there cases where you'd want to instead only see the column number but not jump to that location in a file?
  • Keeping/reusing the editor is tracked in Source code downloaded via the debuggers sourceRequest creates lots of duplicate open files across debug sessions #131502
  • "So I put a breakpoint into line 147, but the "Canceled" message just kept logging as before, so I guess it pointed to the wrong line." -- note that you can place a breakpoint at a specific column in a line via the Debug: Inline Breakpoint command (shift F9)

@connor4312 connor4312 added info-needed Issue requires more information from poster debug Debug viewlet, configurations, breakpoints, adapter issues under-discussion Issue is under discussion for relevance, priority, approach labels Jul 26, 2024
Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vs-code-engineering vs-code-engineering bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 17, 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 info-needed Issue requires more information from poster under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

3 participants