-
Notifications
You must be signed in to change notification settings - Fork 1.2k
🐛 resolve pythonPath in debug config #774
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
🐛 resolve pythonPath in debug config #774
Conversation
Archive of 0.7.0
* 'master' of https://github.com/Microsoft/vscode-python: Fixes #56 list all environments (#219) Fixes #57 Disable activation on debugging (#220) Fixes #26 Do not run linters when linters are disabled (#222)
* upstream/master: Fix typo in README.md (#252) Disable linter without workspaces (#241)
* upstream/master: Fix feedback service (#246) Fix django context initializer (#248) disable generation of tags file upon extension load (#264)
* upstream/master: Resolve pythonPath before comparing it to shebang (#273)
* upstream/master:
Fixes #22 to Detect anaconda from known locations (#221)
Use workspaceFolder token instead of workspaceRoot (#267)
Fix registry lookup response (#224)
Fix issues when running without debugging and debugged code terminates (#249)
* upstream/master: Fix debugging tests (#304)
* upstream/master: Remove jupyter functionality in favor of Jupyter extension (#302) Drop Python 2 URLs (#307)
* upstream/master: Remove setting python.formatting.formatOnSave in favor of the vs code setting (#312)
* upstream/master: Remove setting linting.lintOnTextChange as it was never implemented (#315)
* upstream/master: Fix travis build error (#326)
* upstream/master: add new npm deps with improved gulp for dev (#328)
* upstream/master: Update version of inversify package (#329)
* upstream/master: Document our dev process (#330)
* upstream/master: Document contribution to the code along with coding standards (#321)
* upstream/master: Add Simplified Chinese translation of commands (#240)
* upstream/master: Fix package.json (#347)
* upstream/master: #34, #110 - suppress Intellisense in strings and comments (#339) Re-factor code python execution framework (#345)
* upstream/master: Fix linters to make use of the new python code execution framework (#360) Update the versioning scheme (#356) Make npm happy in regards to line endings (#357)
* upstream/master: Ensure python path is not set if already set in user settings (#369) Use 'an' rather than 'a' before vowel words (#373)
* upstream/master: Use new environment variable parser (#362)
* upstream/master: Fix auto-indent regex rules (#562) Fix linter installation (#557) Upload buillds to azure (#534) Delete package-lock.json file (#550) Fix exception reported in #447 (#536)
* upstream/master: Move badges to the official location within package.json (#587) Update contributing guide to mention our monthly release cycle (#567) Move issue template to the .github directory (#566)
* upstream/master: Added unit test attaching a debugger (#597) Add delay for exec in terminal (#592) Update TPN for opn and arch (#600) Clean build output (#595) import specific parts of rxjs to speed up loading (#596)
* upstream/master: update reflect metadata dependency (#604)
* upstream/master: WIP - Activate environment in terminal (#614) Add telemetry for debugger (#546)
* upstream/master: Implements linting configuration (#599)
* upstream/master: Add command to create a python terminal (#625) Always display interpreter status bar (#623) Do not clear interpreter cache (#621)
* upstream/master: Create a release candidate (#663) Activation of terminal using conda activate and fixes to powershell script execution (#665)
* upstream/master: Validate file execution handler (#698) Update contributing guide (#687) Formatting on Enter (#649) Start the 2018.2.0 alpha (#685) Prep for 2018.1 final (#683) Speed up interpreter locators (#676)
* upstream/master: Debug specific unittest test ends up running all failed tests (#671) Fix unhandled promise rejections (#702) 🐛 Fixes #700 replace back slashes in fie paths with forward slashes (#707) Validate file execution handler (#698) Update contributing guide (#687) Formatting on Enter (#649) Start the 2018.2.0 alpha (#685) Prep for 2018.1 final (#683) Speed up interpreter locators (#676) Create a release candidate (#663) Activation of terminal using conda activate and fixes to powershell script execution (#665) Register linter commands (#653) Preserve focus when sending text to a terminal (#651) Work around VSC issue with formatting on save #624 (#635) Korean translation (#540) Improving getting started instructions in README and minor updates to contributors guide (#605) Bump to a beta version for some testing (#630) Activate extension when command 'Create Terminal' is invoked (#632)
* upstream/master: Debugger unit tests (#724)
* upstream/master: Renamed default configuration name (#712) Improve tooltip display (#725)
* upstream/master: Renamed default configuration name (#712) Improve tooltip display (#725) Debugger unit tests (#724)
* upstream/master: Limit Jedi RAM consumption (#744) Fix debug test failure (#739) Ensure paths are always using forward slashes in terminal commands and args (#732)
* upstream/master: Add support for latest version of PTVSD as an experimental debugger (#745)
* upstream/master: 🐛 use 32bit integers for threadid in protocol layer (#761)
Codecov Report
@@ Coverage Diff @@
## master #774 +/- ##
==========================================
+ Coverage 62.36% 62.85% +0.48%
==========================================
Files 251 254 +3
Lines 11589 11618 +29
Branches 2074 2071 -3
==========================================
+ Hits 7228 7303 +75
+ Misses 4353 4307 -46
Partials 8 8
Continue to review full report at Codecov.
|
import { IDebugConfigurationProvider } from '../types'; | ||
|
||
export function registerTypes(serviceManager: IServiceManager) { | ||
serviceManager.addSingleton<DebugConfigurationProvider>(IDebugConfigurationProvider, PythonDebugConfigurationProvider); |
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.
<IDebugConfigurationProvider>
?
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.
Can't, this is a native VSCode interface
if (workspaceFolder) { | ||
return workspaceFolder.uri; | ||
} | ||
} |
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.
So with multiple workspaceFolders
return value is undefined.
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 this would happen if the file being debugged doesn't belong to any of the current workspaces.
const numberOfSettings = Object.keys(config); | ||
const provideDefaultConfigSettings = (config.noDebug === true && numberOfSettings.length === 1) || numberOfSettings.length === 0; | ||
const workspaceFolder = this.getWorkspaceFolder(folder, config); | ||
if (!provideDefaultConfigSettings) { |
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 for workspaceFolder
to be undefined?
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.
Yes.
Fixes #691