Support Node debug protocol autodetection alongside dynamically putting proc into debug mode #25036
Labels
debug
Debug viewlet, configurations, breakpoints, adapter issues
feature-request
Request for new features or functionality
on-testplan
Milestone
I need to support
"processId": "${command:PickProcess}"
in a launch config for the 'inspector' protocol. In Node 8, when aSIGUSR1
signal is sent to the process, it will be in debug mode for the inspector protocol instead of the legacy protocol.Currently, startSession does protocol detection for attach, then picks the debug adapter, then the
command:PickProcess
variable is resolved to execute the PickProcess command. Then the debug adapter sees the PID and sends the signal to put it into debug mode. We need to flip this around so that the process can be put into debug mode, then the protocol detected, so the adapter can be selected.One possibility:
startSession
, when detecting the protocol for 'attach', checksprocessID
, and resolves the command variable manually to run the PickProcess command, instead of letting vscode do it~ Or, we need the user to know which port will be used. But in that case, they may as well just set 'protocol' too because the two are dependent. (Or we look at port number to assume which protocol, instead of autodetect)
That's not totally satisfactory because of the slim chance of attaching to the wrong process, or requiring the user to set the port. It's maybe the best we can do. Thoughts @weinand, @isidorn?
The text was updated successfully, but these errors were encountered: