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

Feature Request: variable holding the current env #3588

Closed
Jason2866 opened this issue Feb 27, 2023 · 5 comments
Closed

Feature Request: variable holding the current env #3588

Jason2866 opened this issue Feb 27, 2023 · 5 comments
Labels
Milestone

Comments

@Jason2866
Copy link

Jason2866 commented Feb 27, 2023

which will allow users to use native VSCode's workbench.action.tasks.runTask and PlatformIO commands.

Example:

{
  "platformio-ide.toolbar": [
    {
      "text": "Clean Active Environment",
      "commands": [
        {
          "id": "workbench.action.tasks.runTask",
          "args": "PlatformIO: Clean (${command:platformio-ide.activeEnvironment})"
        }
      ]
    },
  ]
}

Reference #2623 (comment)

Thx @ivankravets

@ivankravets ivankravets added this to the 3.0.1 milestone Feb 27, 2023
@ivankravets
Copy link
Member

Fixed in 27e1411

Could you re-test with PlatformIO IDE 3.0.1-beta.3 for VSCode?

@Jason2866
Copy link
Author

@ivankravets Nearly there :-)

Works perfect if env is selected via Platformio VSC IDE Options.
Bildschirm­foto 2023-02-28 um 22 32 11
when used Default in Platformio VSC IDE
Bildschirm­foto 2023-02-28 um 22 34 31
and the default_envs is set in platformio.ini it does not work as expected
Bildschirm­foto 2023-02-28 um 22 35 44

The window opens to select an env
Bildschirm­foto 2023-02-28 um 22 38 18
an not the set default_env is used.

@Jason2866
Copy link
Author

Jason2866 commented Feb 28, 2023

Tested with

        "text": "$(refresh)",
        "tooltip": "Testing",
        "commands": [
          {
            "id": "platformio-ide.runPIOCoreCommand",
            "args": "pio run -t uploadfs -e ${command:platformio-ide.activeEnvironment}"
          }
        ]
      },

works fine with selection via Platformio VSC IDE.

Fails with set_default in platformio.ini since the ${command:platformio-ide.activeEnvironment} is not set (undefined).

Bildschirm­foto 2023-02-28 um 23 03 36

Probably missing to set this entry:

Bildschirm­foto 2023-02-28 um 23 24 05

@ivankravets ivankravets reopened this Mar 7, 2023
@ivankravets
Copy link
Member

Should be fixed in the pre-release version:

  1. Navigate in VSCode to the Extensions activity bar
  2. Click on the PlatformIO IDE
  3. Switch to the PRE-RELEASE version.

Does it work now?

@Jason2866
Copy link
Author

@ivankravets Great, it does work now! Thx for your awesome work and support :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants