-
Notifications
You must be signed in to change notification settings - Fork 645
Show warning if 'program' attribute is used in 'remote' #2999
Conversation
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.
Any idea why the whole file is appearing in the diff?
src/goDebugConfiguration.ts
Outdated
* Show warningMessage to the user if warningCondition is met. | ||
* If the user chooses not to see the warning again, sets it to the global state. | ||
*/ | ||
private showWarning(warningKey: string, warningMessage: string, warningCondition: boolean) { |
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.
If warningCondition
is true, then the entire code path in this method is a no-op. It would be easier to read the code if this condition was checked outside and this function called only if it were true
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.
Also would suggest renaming warningKey
to ignoreWarningKey
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.
@ramya-rao-a PTAL
src/goDebugConfiguration.ts
Outdated
`Request type of 'launch' with mode 'remote' is deprecated, please use request type 'attach' with mode 'remote' instead.`); | ||
} | ||
|
||
if (debugConfiguration.request === 'launch' && debugConfiguration['mode'] === 'remote') { |
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.
Shouldn't the request here be attach
?
@ramya-rao-a PTAL |
When using the debugger in remote attach mode, users have to use
cwd
instead ofprogram
. This can be confusing so we should show a warning message.