Particle:compile locally?

I have workbench installed, created a new project, downloaded the local toolchain but I do not get a choice for “compile” from the command section. It only gives me the choice to compile in the cloud. I must be missing something?

For local building try Ctrl/Cmd+Shift+B (B for Build instead of P for Particle)

Gotcha, did that. So now it says, Select the build task to run, and then underneath it says “No build task to run found”, configure. I click configure, but none of the choices look like something I would use.

Do you get this dialog?

No, I only get Particle: Cloud Compile and Cloud Flash when typing Particle: C

This is what I get after Ctrl/Cmd+Shift+P and then type Particle: C


But the screenshot from earlier comes up with Ctrl/Cmd+Shift+B without typing anything else.
However, your VSC installation might have a different assignment for that keyboard shortcut.
Check if you actually have it assigned to this task

This is what I see in my shortcuts…

and with cmd-shift-p

@iitgrad - see: Command Palete doesn't show local build/flash options - #4 by m_m

TL;DR

The Ctrl/Cmd+Shift+B shortcut will only show you Build tasks (we have both "Build" and "Clean" tasks)

Click the “Terminal” menu, then selecting “Run Task…” while you have your Particle Workspace open ("File" menu then "Open Workspace") will show all the available tasks.

ok, tried that. this is what I get initially.

Then when I click Configure Tasks, it gives me this list.

@iitgrad can you show me the “Explorer” panel / file layout for your workspace? (“View” > “Explorer”)

also, for future reference, this is the info we need to best help troubleshoot :+1:

Gotcha. sorry about not doing the audit. Just did it and will sanitize first before I send. Note here is the image of my explorer.

{
    "username": "",
    "vscode": {
        "appName": "Visual Studio Code",
        "appRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
        "machineId": "dbb8d085aca42a2c8fe7d70310d5fe06f79d6b7165c83f40c6602f330be72386",
        "sessionId": "260fa4d9-4212-45be-a23b-1ba4b7a2a47e1541020270301",
        "version": "1.28.2"
    },
    "cli": {
        "binpath": "/Users/johndoe/.vscode/extensions/particle.particle-vscode-core-1.0.0-alpha.4/src/cli/bin/darwin/amd64/particle",
        "ok": true,
        "version": "1.35.2"
    },
    "localCompiler": {
        "dependencies": [
            "deviceOS@0.7.0",
            "gcc-arm@5.3.1",
            "buildtools@1.0.0",
            "buildscripts@1.0.0"
        ]
    },
    "platform": {
        "os": "darwin",
        "type": "Darwin",
        "release": "18.0.0",
        "arch": "x64",
        "path": {
            "key": "PATH",
            "value": "/Users/johndoe/.platformio/penv/bin:/Users/johndoe/.platformio/penv:/Users/johndoe/.local/bin:/Users/johndoe/bin:/Users/johndoe/.platformio/penv/bin:/usr/local/gcc-arm/gcc-arm-none-eabi-7-2017-q4-major/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/opt/X11/bin:/Applications/Postgres.app/Contents/Versions/latest/bin"
        },
        "homeDir": "/Users/johndoe",
        "particleDir": "/Users/johndoe/.particle",
        "localCompilerToolchainDir": "/Users/johndoe/.particle/toolchains"
    },
    "env": {
        "TERM_PROGRAM": "iTerm.app",
        "TERM": "xterm-256color",
        "SHELL": "/bin/zsh",
        "TMPDIR": "/var/folders/64/6lw8_t3501l4fp4bftk7d95w0000gn/T/",
        "Apple_PubSub_Socket_Render": "/private/tmp/com.apple.launchd.nmK8w4epyX/Render",
        "TERM_PROGRAM_VERSION": "3.2.5",
        "TERM_SESSION_ID": "w2t0p0:3FFB11FE-C9F8-4D5F-947F-EF82DCD1738D",
        "ZSH": "/Users/johndoe/.oh-my-zsh",
        "USER": "johndoe",
        "SSH_AUTH_SOCK": "/private/tmp/com.apple.launchd.mY92QZA7gW/Listeners",
        "__CF_USER_TEXT_ENCODING": "0x1F5:0x0:0x0",
        "PAGER": "less",
        "LSCOLORS": "Gxfxcxdxbxegedabagacad",
        "PATH": "/Users/johndoe/.platformio/penv/bin:/Users/johndoe/.platformio/penv:/Users/johndoe/.local/bin:/Users/johndoe/bin:/Users/johndoe/.platformio/penv/bin:/usr/local/gcc-arm/gcc-arm-none-eabi-7-2017-q4-major/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/opt/X11/bin:/Applications/Postgres.app/Contents/Versions/latest/bin",
        "PWD": "/Users/johndoe/Dropbox/WCL/WCL_V2/TechTalks/Interrupts/Photon",
        "LANG": "en_US.UTF-8",
        "ITERM_PROFILE": "Default",
        "XPC_FLAGS": "0x0",
        "XPC_SERVICE_NAME": "0",
        "SHLVL": "2",
        "HOME": "/Users/johndoe",
        "COLORFGBG": "7;0",
        "ITERM_SESSION_ID": "w2t0p0:3FFB11FE-C9F8-4D5F-947F-EF82DCD1738D",
        "LESS": "-R",
        "LOGNAME": "johndoe",
        "LC_CTYPE": "en_US.UTF-8",
        "DISPLAY": "/private/tmp/com.apple.launchd.o1wRXXwJ4p/org.macosforge.xquartz:0",
        "COLORTERM": "truecolor",
        "_": "/Applications/Visual Studio Code.app/Contents/MacOS/Electron",
        "APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true",
        "VSCODE_CLI": "1",
        "ELECTRON_NO_ATTACH_CONSOLE": "1",
        "GOOGLE_API_KEY": "IS-A-SECRET",
        "VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
        "VSCODE_NODE_CACHED_DATA_DIR_30620": "/Users/johndoe/Library/Application Support/Code/CachedData/7f3ce96ff4729c91352ae6def877e59c561f4850",
        "VSCODE_LOGS": "/Users/johndoe/Library/Application Support/Code/logs/20181031T161109",
        "VSCODE_IPC_HOOK": "/Users/johndoe/Library/Application Support/Code/1.28.2-main.sock",
        "VSCODE_PID": "30620",
        "AMD_ENTRYPOINT": "vs/workbench/node/extensionHostProcess",
        "PIPE_LOGGING": "true",
        "VERBOSE_LOGGING": "true",
        "VSCODE_IPC_HOOK_EXTHOST": "/var/folders/64/6lw8_t3501l4fp4bftk7d95w0000gn/T/vscode-ipc-144824ca-ec42-43f3-a3c6-8b08da88b5a0.sock",
        "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
        "VSCODE_LOG_STACK": "false",
        "VSCODE_LOG_LEVEL": "undefined",
        "CRASH_REPORTER_START_OPTIONS": "{\"companyName\":\"Microsoft\",\"productName\":\"VSCode\",\"submitURL\":\"https://rink.hockeyapp.net/api/2/apps/21a48a66799e47fea4f52c0ff81e803d/crashes/upload\",\"extra\":{\"vscode_version\":\"1.28.2\",\"vscode_commit\":\"7f3ce96ff4729c91352ae6def877e59c561f4850\",\"processName\":\"extensionHost\"},\"crashesDirectory\":\"/var/folders/64/6lw8_t3501l4fp4bftk7d95w0000gn/T\"}",
        "ELECTRON_RUN_AS_NODE": "1",
        "PLATFORMIO_CALLER": "vscode",
        "LC_ALL": "en_US.UTF-8",
        "PLATFORMIO_IDE": "1.4.3"
    },
    "versions": {
        "http_parser": "2.7.0",
        "node": "8.9.3",
        "v8": "6.1.534.41",
        "uv": "1.15.0",
        "zlib": "1.2.11",
        "ares": "1.10.1-DEV",
        "modules": "57",
        "nghttp2": "1.25.0",
        "openssl": "1.0.2n"
    },
    "extensions": [
        {
            "id": "ms-vscode.node-debug",
            "version": "1.28.2"
        },
        {
            "id": "ms-vscode.node-debug2",
            "version": "1.28.3"
        },
        {
            "id": "austin.code-gnu-global",
            "version": "0.2.2"
        },
        {
            "id": "christian-kohler.npm-intellisense",
            "version": "1.3.0"
        },
        {
            "id": "dbaeumer.jshint",
            "version": "0.10.20"
        },
        {
            "id": "dbaeumer.vscode-eslint",
            "version": "1.6.1"
        },
        {
            "id": "Equinusocio.vsc-material-theme",
            "version": "2.5.1"
        },
        {
            "id": "esbenp.prettier-vscode",
            "version": "1.6.1"
        },
        {
            "id": "fabiospampinato.vscode-open-in-finder",
            "version": "1.1.6"
        },
        {
            "id": "formulahendry.auto-close-tag",
            "version": "0.5.6"
        },
        {
            "id": "formulahendry.auto-rename-tag",
            "version": "0.0.15"
        },
        {
            "id": "hollowtree.vue-snippets",
            "version": "0.1.9"
        },
        {
            "id": "HookyQR.beautify",
            "version": "1.4.7"
        },
        {
            "id": "KnisterPeter.vscode-github",
            "version": "0.30.0"
        },
        {
            "id": "marus25.cortex-debug",
            "version": "0.1.21"
        },
        {
            "id": "mikestead.dotenv",
            "version": "1.0.1"
        },
        {
            "id": "mrmlnc.vscode-duplicate",
            "version": "1.2.1"
        },
        {
            "id": "ms-python.python",
            "version": "2018.9.2"
        },
        {
            "id": "ms-vscode.cpptools",
            "version": "0.20.0"
        },
        {
            "id": "msjsdiag.debugger-for-chrome",
            "version": "4.10.2"
        },
        {
            "id": "octref.vetur",
            "version": "0.13.0"
        },
        {
            "id": "particle.particle-vscode-core",
            "version": "1.0.0-alpha.4"
        },
        {
            "id": "particle.particle-vscode-snippets",
            "version": "1.0.0-alpha.4"
        },
        {
            "id": "particle.particle-vscode-theme",
            "version": "1.0.0-alpha.4"
        },
        {
            "id": "platformio.platformio-ide",
            "version": "1.4.3"
        },
        {
            "id": "ritwickdey.LiveServer",
            "version": "5.1.1"
        },
        {
            "id": "webfreak.debug",
            "version": "0.22.0"
        },
        {
            "id": "xabikos.JavaScriptSnippets",
            "version": "1.7.1"
        },
        {
            "id": "zhuangtongfa.Material-theme",
            "version": "2.17.7"
        }
    ]
}

@iitgrad :thinking: i see you have a .code-workspace file so that’s definitely a workspace but i think you’ve opened it as a folder? usually is says “WORKSPACE” next to the folder name so i would expect to see “PHOTON (WORKSPACE)” in the explorer panel there.

try clicking the “File” menu then selecting “Open Workspace” then find your .code-workspace file and open that then retry the “Run Task…” option.

done.

that did it. Now the Terminal: Run Tasks gives me the full list. Hooray! Btw, where I was before was where I ended up after doing Particle: New Project. Tomorrow I’ll see if I can duplicate that.

thanks so much for the help!

@iitgrad sounds good. thanks for trying out the preview :+1: