Skip to content
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

Support for multi project workspace with all config at workspace level #92260

Closed
aussiross opened this issue Mar 9, 2020 · 6 comments
Closed
Assignees

Comments

@aussiross
Copy link

I use vscode with one workspace to hold all of my esp32 projects (TestBlink, TestWifi, ..), and I'm trying to configure all of my development tasks and settings at the esp32 workspace level - ideally with no .vscode in each project. I use the cmake extension for project building, and gdb/openocd over jtag for flash and debug.

I have three issues/feature requests between me and "success".

  1. It seems to me a sensible use case that I have several projects in my esp32 workspace, with some concept of a currently selected project which my scripts then operate on. The cmake extension almost supports this with its "Select Active Folder", but there doesn't appear to be a way to access this selection in my scripts (e.g. ${command:cmake.activeFolder} or similar). I may yet raise a feature request with them for this, but it does seem a better solution that vscode supports this (and changes ${workspaceRoot} accordingly). However, in the scenario with multiple projects
    with no .vscode, I'm told by vscode that "${workspaceRoot} cannot be resolved, please open a folder". Just so, but what does opening a folder mean? The only workaround is to only ever have a single project loaded into my workspace.

  2. I use a preLaunchTask to flash the target. However, it seems I'm forced to provide a project level tasks.json defining "Flash", because otherwise vscode won't resolve the "Flash" task name to a workspace level task. Or perhaps I'm not using the undocumented "type:" in the preLaunchTask config correctly?

  3. Rather than the (naff) situation at present where "Run without Debug" still hits the debug entry breakpoint, I'd like some variable (e.g. ${currentCommand} or similar) which I can pass into my pre-launch Flash script. This could perform the Flash, then switch on the command and if "Run without Debug" it can just issue a hard reset to the target before exiting with nonzero status to bypass the debugger. Does a suitable variable exist?

@bpasero bpasero assigned sandy081 and unassigned bpasero Mar 9, 2020
@bpasero bpasero added the config VS Code configuration, set up issues label Mar 9, 2020
@sandy081 sandy081 assigned weinand, isidorn and alexr00 and unassigned sandy081 Mar 13, 2020
@sandy081 sandy081 removed the config VS Code configuration, set up issues label Mar 13, 2020
@sandy081
Copy link
Member

We already support workspace level settings, tasks and launches. Looks like user have issues with

  1. ${workspaceRoot} - resolving this config variable (Debug or Tasks)?
  2. preLaunchTask - Tasks
  3. currentCommand in Run without Debug

Hence moving to tasks and debug owners.

@isidorn
Copy link
Contributor

isidorn commented Mar 13, 2020

  1. Please use ${workspaceFolder} scoped per folder. More details here https://code.visualstudio.com/docs/editor/variables-reference#_variables-scoped-per-workspace-folder
  2. I leave this to Alex Ross
  3. This sounds like a feature request please file a new concise issue explaiaing what exaclty you need

@alexr00
Copy link
Member

alexr00 commented Apr 6, 2020

I use a preLaunchTask to flash the target. However, it seems I'm forced to provide a project level tasks.json defining "Flash", because otherwise vscode won't resolve the "Flash" task name to a workspace level task. Or perhaps I'm not using the undocumented "type:" in the preLaunchTask config correctly?

Can you give an example of the relevant files for this (launch.json, .code-workspace, and task.json)?

@aussiross
Copy link
Author

aussiross commented Apr 6, 2020 via email

@LucaGabi
Copy link

LucaGabi commented Apr 15, 2020

can you also please read this here: #95182 and upvote if you find it useful ?

@weinand
Copy link
Contributor

weinand commented Apr 15, 2020

Since author said:

Since my aim was everything at the workspace level, this is no longer
an issue for me.

I'm closing this issue.

@weinand weinand closed this as completed Apr 15, 2020
@github-actions github-actions bot locked and limited conversation to collaborators May 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants