-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Attach to local process - launch.json update #8831
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
Attach to local process - launch.json update #8831
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8831 +/- ##
==========================================
+ Coverage 58.65% 58.68% +0.02%
==========================================
Files 526 526
Lines 27212 27231 +19
Branches 4059 4064 +5
==========================================
+ Hits 15962 15980 +18
- Misses 10371 10372 +1
Partials 879 879
Continue to review full report at Codecov.
|
src/client/debugger/extension/hooks/childProcessAttachService.ts
Outdated
Show resolved
Hide resolved
const port = configuration.port ? configuration.port : 0; | ||
const isAttach = configuration.request === 'attach'; | ||
const port = configuration.port ?? 0; | ||
const processId = configuration.processId ?? 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious, if we have a check for 0
, then why not < 0
I think we can prevent user from entering 0
or -2
by using the json schema.
This way the code can validate whether is a number or not (deal with nullables, instead of 0
or not)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the json schema port
and processId
are numbers, so there is already some validation going on. @karthiknadig's original logic was to set port
's value to 0 if undefined since it isn't an accepted value anyway, I just applied it toprocessId
as well.
My VSCode don't create launch.json. I don't know why... |
For #8384
package-lock.json
has been regenerated by runningnpm install
(if dependencies have changed)