Default debugging in a multiroot workspace sets working directory inconsistently #111037
Labels
*caused-by-extension
Issue identified to be caused by an extension
debug
Debug viewlet, configurations, breakpoints, adapter issues
When running tasks in VS Code, the default working directory is current workspace's root folder. However, in the case of a multiroot workspace with no custom launch tasks, the debugger doesn't seem to handle files from different roots consistently. The working folder, when printed, seems to depend on which ever root the first active file was from. This causes confusing errors for example when attempting to open a file using a relative path.
Of course this could be circumvented by defining a
tasks.json
file for each root in the workspace. In some circumstances though, it is much more convenient to simply be able to debug the active file.This issue occurs at least with javascript and python files (latter using the Python extension).
Steps to Reproduce:
console.log(process.cwd())
.launch.json
present, "Run and Debug" both files with node.js while they are active.Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: