segunda-feira, 8 de fevereiro de 2021

Debug Mult Thread Visual Code Protheus

 É possível debugar multithread no protheus, através do visual code, para isso configure no seu launch.json as tags: "isMultiSession": true, "enableTableSync": true, "enableMultiThread": true

Ex:



Compilar Extensões e Recursos Visual Code Protheus

É possível compilar outros recursos no repositório do protheus utilizando o visual code, para isso, utilize a tag "totvsLanguageServer.folder.extensionsAllowed" no settings.json, ex: ".APP", ".BMP".

Importante: estar apenas com o plugin da totvs instalado no vs.
TOTVS Developer Studio for VSCode (AdvPL, TLPP e 4GL)

    "totvsLanguageServer.folder.extensionsAllowed": [
        ".PRW",
        ".PRX",
        ".PRG",
        ".PPX",
        ".PPP",
        ".TLPP",
        ".APW",
        ".APH",
        ".APL",
        ".AHU",
        ".TRES",
        ".PNG",
        ".BMP",
        ".RES",
        ".4GL",
        ".PER",
        ".JS",
        ".APP"
    ]

Encode ADVPL Visual Code Protheus

Ao abrir arquvis em extensões diferentes é possível configurar em qual encode o arquivo será carregado, evitando problemas de encode indevido.

No arquivo settings.josn, use a tag, files.encoding, ex:

"[prw]": {
    "files.encoding""windows1252",
    }


  "workbench.iconTheme""vscode-icons",
    "[CH]": {
    "files.encoding": "windows1252",
    },
    "[ini]": {
    "files.encoding": "windows1252",
    },
    "[advpl]": {
    "files.encoding": "windows1252",
    },
    "[prw]": {
    "files.encoding": "windows1252",
    },
    "[PRW]": {
    "files.encoding": "windows1252",
    },
    "[python]": {
    "files.encoding": "utf8",
    },
    "[html]": {
    "files.encoding": "utf8",
    },
    "[pug]": {
    "files.encoding": "utf8",
    },
    "[javascript]": {
    "files.encoding": "utf8",
    },
    "[typescript]": {
    "files.encoding": "utf8",
    },
    "[php]": {
    "files.encoding": "utf8",
    },
    "[json]": {
    "files.encoding": "utf8",
    },
    "[css]": {
    "files.encoding": "utf8",
    },
    "editor.codeActionsOnSave"null