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

Proposal: Allow TS Server to be spawned with --inspect-brk #98340

Merged
merged 1 commit into from
May 26, 2020

Conversation

andrewbranch
Copy link
Member

I’ve found this to be very useful while developing TS Server features, as a lot of work happens immediately after VS Code spawns TS Server, which doesn’t allow enough time to attach a debugger unless the process pauses. I plan on also updating my vscode-tsserver-debug extension to leverage this if merged.

While this change would make my work (and likely the work of others working on TS Server) much easier, it should be considered with some caution, since it means that TS Server cannot start in the presence of a TSS_DEBUG_BRK environment variable until a debugger attaches and unpauses its execution. If by some very strange means (e.g., malicious extension code?) a user unknowingly ended up with this environment variable set, JS/TS language service operations wouldn’t work and it could be difficult to diagnose. So I’m open to feedback on other ways to accomplish this, depending on the level of concern from the team.

@mjbvz for thoughts, whenever you have a minute.

@kieferrm kieferrm requested a review from mjbvz May 21, 2020 22:12
@mjbvz mjbvz added this to the May 2020 milestone May 26, 2020
@mjbvz mjbvz merged commit 766e520 into microsoft:master May 26, 2020
@mjbvz
Copy link
Collaborator

mjbvz commented May 26, 2020

This looks good to me. Thanks for taking a look.

The name TSS_DEBUG_BRK is pretty specific so I don't anticipate users accidentally setting this

@andrewbranch andrewbranch deleted the tss-debug-brk branch May 29, 2020 16:35
@github-actions github-actions bot locked and limited conversation to collaborators Jul 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants