[ISSUE] particle code appears as Arduino [solved]

My particle files are stored on dropbox so they can be accessed by a desktop iMac and a remote laptop. Files appear and compile correctly in Workbench on the iMac but seem to be treated as Arduino files and won’t compile when opened on the laptop. I’m saying this because none of the local compile icons appear at top-right of the screen, or the device and os selectors at the bottom right.

Any suggestions on what settings I have incorrect?

Thanks!

Below is the ‘audit environment’ report:


{
    "username": "xxxxx",
    "workspace": {
        "name": "simpleGateway",
        "isWorkspace": false,
        "folders": []
    },
    "cli": {
        "binpath": "/Users/Andrew/.vscode/extensions/particle.particle-vscode-core-1.4.8/src/cli/bin/darwin/amd64/particle",
        "ok": true,
        "version": "1.42.0",
        "installed": 1560511756514
    },
    "localCompiler": {
        "ok": true,
        "dependencies": [
            {
                "id": "deviceOS@1.1.0",
                "ok": true
            },
            {
                "id": "gcc-arm@5.3.1",
                "ok": true
            },
            {
                "id": "buildtools@1.0.3",
                "ok": true
            },
            {
                "id": "buildscripts@1.5.1",
                "ok": true
            },
            {
                "id": "openocd@0.10.0-particle.1",
                "ok": true
            },
            {
                "id": "deviceOS@1.0.1",
                "ok": true
            },
            {
                "id": "deviceOS@0.9.0",
                "ok": true
            },
            {
                "id": "deviceOS@0.7.0",
                "ok": true
            }
        ]
    },
    "platform": {
        "os": "darwin",
        "type": "Darwin",
        "release": "18.6.0",
        "arch": "x64",
        "path": {
            "key": "PATH",
            "value": "/opt/local/bin:/opt/local/sbin:/Users/Andrew/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
        },
        "homeDir": "/Users/Andrew",
        "particleDir": "/Users/Andrew/.particle",
        "localCompilerToolchainDir": "/Users/Andrew/.particle/toolchains"
    },
    "env": {
        "TMPDIR": "/var/folders/y6/400sg8n50mg6bfy36_ywrq100000gq/T/",
        "__CF_USER_TEXT_ENCODING": "0x1F7:0x0:0xF",
        "SHELL": "/bin/bash",
        "HOME": "/Users/Andrew",
        "Apple_PubSub_Socket_Render": "/private/tmp/com.apple.launchd.AHaQiCX3LB/Render",
        "SSH_AUTH_SOCK": "/private/tmp/com.apple.launchd.1IMz9gKLUK/Listeners",
        "PATH": "/opt/local/bin:/opt/local/sbin:/Users/Andrew/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
        "LOGNAME": "Andrew",
        "XPC_SERVICE_NAME": "com.microsoft.VSCode.36840",
        "USER": "Andrew",
        "XPC_FLAGS": "0x0",
        "VSCODE_NLS_CONFIG": "{\"locale\":\"en-gb\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
        "VSCODE_NODE_CACHED_DATA_DIR": "/Users/Andrew/Library/Application Support/Code/CachedData/c7d83e57cd18f18026a8162d042843bda1bcf21f",
        "VSCODE_LOGS": "/Users/Andrew/Library/Application Support/Code/logs/20190630T002610",
        "VSCODE_IPC_HOOK": "/Users/Andrew/Library/Application Support/Code/1.35.1-main.sock",
        "VSCODE_PID": "11942",
        "PWD": "/",
        "SHLVL": "1",
        "_": "/Users/Andrew/Applications/Visual Studio Code.app/Contents/MacOS/Electron",
        "AMD_ENTRYPOINT": "vs/workbench/services/extensions/node/extensionHostProcess",
        "PIPE_LOGGING": "true",
        "VERBOSE_LOGGING": "true",
        "VSCODE_IPC_HOOK_EXTHOST": "/var/folders/y6/400sg8n50mg6bfy36_ywrq100000gq/T/vscode-ipc-af308f77-eeb1-465c-8f2d-9c6d7c3e5028.sock",
        "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
        "VSCODE_LOG_STACK": "false",
        "VSCODE_PREVENT_FOREIGN_INSPECT": "true",
        "ELECTRON_RUN_AS_NODE": "1",
        "APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true"
    },
    "versions": {
        "http_parser": "2.8.0",
        "node": "10.2.0",
        "v8": "6.6.346.32",
        "uv": "1.20.3",
        "zlib": "1.2.11",
        "ares": "1.14.0",
        "modules": "64",
        "nghttp2": "1.29.0",
        "napi": "3",
        "openssl": "1.1.0h"
    },
    "vscode": {
        "appName": "Visual Studio Code",
        "appRoot": "/Users/Andrew/Applications/Visual Studio Code.app/Contents/Resources/app",
        "machineId": "9cf72aff7f896c8e1003701f915ec09eb60aa779df4ab454b0093c8eaef8fcd2",
        "sessionId": "be6aac90-2c4c-4b68-8e0b-8f9c82afa7f61561818371339",
        "version": "1.35.1"
    },
    "extensions": [
        {
            "id": "ms-vscode.node-debug",
            "version": "1.35.2"
        },
        {
            "id": "ms-vscode.node-debug2",
            "version": "1.33.0"
        },
        {
            "id": "ms-vscode.references-view",
            "version": "0.0.27"
        },
        {
            "id": "marus25.cortex-debug",
            "version": "0.3.1"
        },
        {
            "id": "ms-vscode.cpptools",
            "version": "0.24.0-insiders3"
        },
        {
            "id": "particle.particle-vscode-core",
            "version": "1.4.8"
        },
        {
            "id": "particle.particle-vscode-pack",
            "version": "1.4.8"
        },
        {
            "id": "particle.particle-vscode-snippets",
            "version": "1.4.8"
        },
        {
            "id": "particle.particle-vscode-theme",
            "version": "1.4.8"
        }
    ]
}

Have you created the project using the Particle: Create New Project command?
Have you tried deactivating the Arduino extension to see if the project is then recognised correctly?
Both - Particle and Arduino - use .ino as the file extension for the main project file, so the confusion would be understandable when both extensions are enabled concurrently.

Yeah, I did various combinations of create new project and disabling and uninstalling the Arduino extension. Best I could get was a mix of Arduino and Particle icons in the top right/lower right panels, but still had compile errors.

I have now uninstalled/reinstalled VS Code, reinstalled Particle extension and uninstalled Arduino extension - this did not fix it.

It is fixed now, just not sure why. Seems to be linked to some weird file structure I had. This folder structure:

17%20am
Resulted in this workbench structure:

The .vscode ‘folder’ at the higher level had a c_cpp_properties.json file in it (now deleted) that I I shouldn’t have according to Error: "Configure your Intellisense settings to help find missing headers" (was: Arduino extension required?)

After deleting the c_cpp_properties.json file and eliminating the higher level folder, all seems to be okay. Touch wood.

2 Likes