-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Change how debug options are captured in launch.json #1395
Change how debug options are captured in launch.json #1395
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1395 +/- ##
==========================================
- Coverage 70.87% 70.65% -0.23%
==========================================
Files 271 271
Lines 12489 12514 +25
Branches 2213 2220 +7
==========================================
- Hits 8852 8842 -10
- Misses 3499 3534 +35
Partials 138 138
Continue to review full report at Codecov.
|
console?: 'none' | 'integratedTerminal' | 'externalTerminal'; | ||
port?: number; | ||
host?: string; | ||
logToFile?: boolean; | ||
} | ||
|
||
export interface AttachRequestArguments extends DebugProtocol.AttachRequestArguments { | ||
export interface LaunchRequestArgumentsV1 extends BaseLaunchRequestArguments { |
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.
Should it be ISomething
?
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.
We are not creating classes based on these interfaces (hence no I
). This was done before types
came along
if (launchRequestOptions.noDebug === true) { | ||
return new NonDebugClient(launchRequestOptions, debugSession, canLaunchTerminal, new NoDebugLauncherScriptProvider()); | ||
launchScriptProvider = launchRequestOptions.type === 'pythonExperimental' ? new NoDebugLauncherScriptProviderV2() : new NoDebugLauncherScriptProvider(); |
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.
having value as string is somewhat error prone (to typos). Perhaps make pythonExperimental
enum or constant?
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.
It is type checked (that property only allows two vales of strings).
So typos will be caught by compiler. (String literal types)
debugConfiguration.debugOptions.push(DebugOptions.Jinja); | ||
&& debugOptions.indexOf(DebugOptions.Jinja) === -1 | ||
&& debugConfiguration.jinja !== false) { | ||
debugOptions.push(DebugOptions.Jinja); |
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.
OK to push twice?
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.
No problem, besides, this code is only for backwards compatibility (well remove this code soon).
d2c9204
to
d4d1de8
Compare
d4d1de8
to
10ca82b
Compare
@DonJayamanne any specific reason not to put in a news entry for this change? |
This applies to experimental debugger, didn't see the need. |
Fixes #1326
This pull request: